예제 #1
0
파일: X2List.php 프로젝트: xl602/X2CRM
 public function setAttributes($values, $safeOnly = true)
 {
     if ($this->type == 'dynamic') {
         $this->criteriaInput = array();
         foreach (array('attribute', 'comparison', 'value') as $property) {
             if (isset($values[$property])) {
                 $this->criteriaInput[$property] = $values[$property];
             }
         }
     }
     parent::setAttributes($values, $safeOnly);
 }
예제 #2
0
파일: X2List.php 프로젝트: tymiles003/X2CRM
 public function setAttributes($values, $safeOnly = true)
 {
     if ($this->type == 'dynamic') {
         $this->criteriaInput = array();
         foreach (array('attribute', 'comparison', 'value') as $property) {
             if (isset($values[$property])) {
                 $this->criteriaInput[$property] = $values[$property];
             }
         }
         $criteria = array_combine($this->criteriaInput['attribute'], $this->criteriaInput['value']);
         if (array_key_exists('tags', $criteria) && empty($criteria['tags'])) {
             $this->addError('tags', Yii::t('contacts', 'Tag list must be non-empty'));
         }
     }
     parent::setAttributes($values, $safeOnly);
 }