/** * Checks if attribute group exists * * @param Mage_Eav_Model_Entity_Attribute_Group $object * @return boolean */ public function itemExists($object) { $adapter = $this->_getReadAdapter(); $bind = array('attribute_set_id' => $object->getAttributeSetId(), 'attribute_group_name' => $object->getAttributeGroupName()); $select = $adapter->select()->from($this->getMainTable())->where('attribute_set_id = :attribute_set_id')->where('attribute_group_name = :attribute_group_name'); return $adapter->fetchRow($select, $bind) > 0; }
/** * Checks if attribute group exists * * @param Mage_Eav_Model_Entity_Attribute_Group $object * @return boolean */ public function itemExists($object) { $select = $this->_getReadAdapter()->select()->from($this->getMainTable())->where('attribute_set_id = ?', $object->getAttributeSetId())->where('attribute_group_name = ?', $object->getAttributeGroupName()); if ($this->_getReadAdapter()->fetchRow($select)) { return true; } return false; }