/** * @param Attribute $defaultAttribute * @param null|integer $index * @throws \arogachev\excel\import\exceptions\CellException */ protected function mergeDefaultAttribute($defaultAttribute, $index = null) { $attribute = new Attribute(['standardAttribute' => $defaultAttribute->standardAttribute, 'cell' => $defaultAttribute->getInitialCell()]); $attribute->linkRelatedModel(); $index === null ? $this->_attributes[] = $attribute : ($this->_attributes[$index] = $attribute); }
/** * @param array $config */ protected function initAttribute($config) { $attribute = new Attribute($config); $attribute->linkRelatedModel(); $this->_attributes[] = $attribute; }