예제 #1
0
 /**
  * Gives attribute groups which come from the given attribute set
  * Returns ['attribute group name' => 'sort order', ...]
  *
  * @param $attrSetId
  *
  * @return array
  */
 protected function _getAttributeGroups($attrSetId)
 {
     $connexion = $this->_setup->getConnection();
     $getOldGroupsQuery = $connexion->select()->from($this->_setup->getTable('eav/attribute_group'))->where('attribute_set_id = :attribute_set_id');
     $bind = array('attribute_set_id' => $attrSetId);
     $currentGroups = array();
     foreach ($connexion->fetchAssoc($getOldGroupsQuery, $bind) as $attrGroup) {
         $currentGroups[$attrGroup['attribute_group_name']] = $attrGroup['sort_order'];
     }
     return $currentGroups;
 }