Exemplo n.º 1
0
 /**
  * Add additional data to attribute.
  *
  * @param Attribute $attribute
  * @return bool
  */
 public function overrideAttribute(Attribute $attribute)
 {
     if (!empty($this->_attributeOverrides[$attribute->getAttributeCode()])) {
         $data = $this->_attributeOverrides[$attribute->getAttributeCode()];
         if (isset($data['options_method']) && method_exists($this, $data['options_method'])) {
             $data['filter_options'] = $this->{$data['options_method']}();
         }
         $attribute->addData($data);
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function addData(array $arr)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'addData');
     if (!$pluginInfo) {
         return parent::addData($arr);
     } else {
         return $this->___callPlugins('addData', func_get_args(), $pluginInfo);
     }
 }