예제 #1
0
 /**
  * @return array
  */
 public function getAttributes()
 {
     if (empty($this->attributes)) {
         $select = $this->connection->select()->from($this->productLink->getTable('catalog_product_link_attribute'), ['id' => 'product_link_attribute_id', 'code' => 'product_link_attribute_code', 'type' => 'data_type'])->where('link_type_id = ?', $this->getLinkTypeId());
         foreach ($this->connection->fetchAll($select) as $row) {
             $this->attributes[$row['code']] = ['id' => $row['id'], 'table' => $this->productLink->getAttributeTypeTable($row['type'])];
         }
     }
     return $this->attributes;
 }