Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @var MagentoEavModelResourceModelEntityAttribute
- */
- protected $_eavAttribute;
- /**
- * @param Context $context
- * @param MagentoEavModelResourceModelEntityAttribute $eavAttribute
- */
- public function __construct(
- Context $context,
- MagentoEavModelResourceModelEntityAttribute $eavAttribute
- )
- {
- $this->_eavAttribute = $eavAttribute;
- parent::__construct($context);
- }
- //Call the getIdByCode method of Attribute in any method
- $attributeId = $this->_eavAttribute->getIdByCode('customer', 'company_name');
Add Comment
Please, Sign In to add comment