Beispiel #1
0
 /**
  * @param $filterId
  * @return \Ess\M2ePro\Model\Magento\Product\Rule\Custom\AbstractCustom
  */
 protected function getCustomFilterInstance($filterId)
 {
     $parentFilters = parent::getCustomFilters();
     if (isset($parentFilters[$filterId])) {
         return parent::getCustomFilterInstance($filterId);
     }
     $customFilters = $this->getCustomFilters();
     $this->_customFiltersCache[$filterId] = $this->modelFactory->getObject('Amazon\\Magento\\Product\\Rule\\Custom\\' . $customFilters[$filterId]);
     return $this->_customFiltersCache[$filterId];
 }
Beispiel #2
0
 /**
  * @param mixed $validatedValue
  * @return bool
  */
 public function validateAttribute($validatedValue)
 {
     if (is_array($validatedValue)) {
         $result = false;
         foreach ($validatedValue as $value) {
             $result = parent::validateAttribute($value);
             if ($result) {
                 break;
             }
         }
         return $result;
     }
     return parent::validateAttribute($validatedValue);
 }