eavEntityFactory = $eavEntityFactory; parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $eavConfig, $connection, $resource); } /** * Resource model initialization * * @return void */ protected function _construct() { $this->_init( CookieConsentEavAttribute::class, MagentoEavResourceAttribute::class ); } /** * @inheritDoc */ protected function _initSelect() { $this->getSelect()->from( ['main_table' => $this->getResource()->getMainTable()] )->where( 'main_table.entity_type_id=?', $this->eavEntityFactory->create()->setType($this->entityCode)->getTypeId() )->join( ['additional_table' => $this->getTable(self::EAV_ATTRIBUTE_ADDITIONAL_TABLE)], 'additional_table.attribute_id = main_table.attribute_id' ); return $this; } /** * Specify attribute entity type filter * * @param int $typeId * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setEntityTypeFilter($typeId) { return $this; } }