Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function process(DbCollection $collection, $extensibleEntityClass = null)
 {
     $extensibleEntityClass = $extensibleEntityClass ?: $collection->getItemObjectClass();
     $joinDirectives = $this->getJoinDirectivesForType($extensibleEntityClass);
     foreach ($joinDirectives as $attributeCode => $directive) {
         /** @var JoinDataInterface $joinData */
         $joinData = $this->extensionAttributeJoinDataFactory->create();
         $joinData->setAttributeCode($attributeCode)->setReferenceTable($directive[Converter::JOIN_REFERENCE_TABLE])->setReferenceTableAlias($this->getReferenceTableAlias($attributeCode))->setReferenceField($directive[Converter::JOIN_REFERENCE_FIELD])->setJoinField($directive[Converter::JOIN_ON_FIELD]);
         $joinData->setSelectFields($this->getSelectFieldsMap($attributeCode, $directive[Converter::JOIN_FIELDS]));
         $collection->joinExtensionAttribute($joinData, $this);
     }
 }
 /**
  * JoinDataInterface getter
  *
  * @return JoinDataInterface
  */
 public function getJoinDataInterface()
 {
     return $this->joinDataInterfaceFactory->create();
 }