Example #1
0
 /**
  * Returns array of group ids, present in collection attributes
  *
  * @param Mage_Eav_Model_Resource_Entity_Attribute_Collection $collection
  * @return array
  */
 protected function _getGroups($collection)
 {
     $collection->addSetInfo();
     $groups = array();
     foreach ($collection as $attribute) {
         foreach ($attribute->getAttributeSetInfo() as $setInfo) {
             $groupId = $setInfo['group_id'];
             $groups[$groupId] = $groupId;
         }
     }
     return array_values($groups);
 }