@@ -353,12 +353,11 @@ protected function _initAttributes($entityType)
353
353
354
354
/** @var Mage_Eav_Model_Resource_Entity_Attribute_Collection $attributesInfo */
355
355
$ attributesInfo = Mage::getResourceModel ($ entityType ->getEntityAttributeCollection ());
356
- $ attributesInfo
357
- ->setEntityTypeFilter ($ entityType )
358
- ->getData ();
356
+ $ attributesInfo ->setEntityTypeFilter ($ entityType );
357
+ $ attributesInfoData = $ attributesInfo ->getData ();
359
358
360
359
$ codes = [];
361
- foreach ($ attributesInfo as $ attribute ) {
360
+ foreach ($ attributesInfoData as $ attribute ) {
362
361
$ this ->_createAttribute ($ entityType , $ attribute );
363
362
$ codes [] = $ attribute ['attribute_code ' ];
364
363
}
@@ -472,10 +471,10 @@ public function getEntityAttributeCodes($entityType, $object = null)
472
471
$ attributesInfo
473
472
->setEntityTypeFilter ($ entityType )
474
473
->setAttributeSetFilter ($ attributeSetId )
475
- ->addStoreLabel ($ storeId )
476
- ->getData ();
474
+ ->addStoreLabel ($ storeId );
475
+ $ attributesInfoData = $ attributesInfo ->getData ();
477
476
$ attributes = [];
478
- foreach ($ attributesInfo as $ attributeData ) {
477
+ foreach ($ attributesInfoData as $ attributeData ) {
479
478
$ attributes [] = $ attributeData ['attribute_code ' ];
480
479
$ this ->_createAttribute ($ entityType , $ attributeData );
481
480
}
@@ -524,17 +523,17 @@ public function preloadAttributes($entityType, $attributes)
524
523
$ attributesInfo = Mage::getResourceModel ($ entityType ->getEntityAttributeCollection ());
525
524
$ attributesInfo
526
525
->setEntityTypeFilter ($ entityType )
527
- ->setCodeFilter ($ attributes )
528
- ->getData ();
526
+ ->setCodeFilter ($ attributes );
527
+ $ attributesInfoData = $ attributesInfo ->getData ();
529
528
530
- if (!$ attributesInfo ) {
529
+ if (!$ attributesInfoData ) {
531
530
Varien_Profiler::stop ('EAV: ' .__METHOD__ . ': ' .$ entityTypeCode );
532
531
return $ this ;
533
532
}
534
533
535
534
$ attributesData = $ codes = [];
536
535
537
- foreach ($ attributesInfo as $ attribute ) {
536
+ foreach ($ attributesInfoData as $ attribute ) {
538
537
if (empty ($ attribute ['attribute_model ' ])) {
539
538
$ attribute ['attribute_model ' ] = $ entityType ->getAttributeModel ();
540
539
}
@@ -548,9 +547,7 @@ public function preloadAttributes($entityType, $attributes)
548
547
}
549
548
550
549
$ this ->_attributeData [$ entityTypeCode ] = $ attributesData ;
551
-
552
550
Varien_Profiler::stop ('EAV: ' .__METHOD__ . ': ' .$ entityTypeCode );
553
-
554
551
return $ this ;
555
552
}
556
553
@@ -619,10 +616,10 @@ public function loadCollectionAttributes($entityType, $attributes)
619
616
$ attributesInfo
620
617
->useLoadDataFields ()
621
618
->setEntityTypeFilter ($ entityType )
622
- ->setCodeFilter ($ attributes )
623
- ->getData ();
619
+ ->setCodeFilter ($ attributes );
620
+ $ attributesInfoData = $ attributesInfo ->getData ();
624
621
625
- foreach ($ attributesInfo as $ attributeData ) {
622
+ foreach ($ attributesInfoData as $ attributeData ) {
626
623
$ attribute = $ this ->_createAttribute ($ entityType , $ attributeData );
627
624
$ this ->_collectionAttributes [$ entityTypeCode ][$ attribute ->getAttributeCode ()] =$ attribute ;
628
625
}
0 commit comments