/** * Return scope values for attribute and website * * @param \Magento\Eav\Model\Attribute $object * @return array */ public function getScopeValues(\Magento\Eav\Model\Attribute $object) { $adapter = $this->_getReadAdapter(); $bind = array('attribute_id' => (int) $object->getId(), 'website_id' => (int) $object->getWebsite()->getId()); $select = $adapter->select()->from($this->_getEavWebsiteTable())->where('attribute_id = :attribute_id')->where('website_id = :website_id')->limit(1); $result = $adapter->fetchRow($select, $bind); if (!$result) { $result = array(); } return $result; }
/** * Return scope values for attribute and website * * @param \Magento\Eav\Model\Attribute $object * @return array */ public function getScopeValues(\Magento\Eav\Model\Attribute $object) { $connection = $this->getConnection(); $bind = ['attribute_id' => (int) $object->getId(), 'website_id' => (int) $object->getWebsite()->getId()]; $select = $connection->select()->from($this->_getEavWebsiteTable())->where('attribute_id = :attribute_id')->where('website_id = :website_id')->limit(1); $result = $connection->fetchRow($select, $bind); if (!$result) { $result = []; } return $result; }