42 $this->connection =
$resource->getConnection();
87 throw new \InvalidArgumentException(sprintf(
'Cannot retrieve attribute for entity type "%s"',
$entityType));
89 $linkFieldName =
$attribute->getEntity()->getLinkField();
90 if (!$linkFieldName) {
91 $linkFieldName = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
93 $select = $this->connection->select()
94 ->from([
'e' =>
$attribute->getEntity()->getEntityTable()], [])
97 "e.{$linkFieldName} = e_attr.{$linkFieldName}",
99 )->where(
'e_attr.attribute_id = ?',
$attribute->getId())
100 ->where(
'e.entity_id = ?', $entityId);
110 private function getMetadataPool()
112 if (!$this->metadataPool) {
114 ->get(\
Magento\Framework\EntityManager\MetadataPool::class);
doesEntityHaveOverriddenUrlPathForStore($storeId, $entityId, $entityType)
doesEntityHaveOverriddenUrlAttributeForStore($storeId, $entityId, $entityType, $attributeName)
doesEntityHaveOverriddenUrlKeyForStore($storeId, $entityId, $entityType)
__construct(Config $eavConfig, ResourceConnection $resource)