Exemple #1
0
 /**
  * Set the element value
  *
  * @param   mixed   $value
  * @return  TagList
  */
 public function setValue($value)
 {
     if ($value instanceof Traversable) {
         $value = ArrayUtils::iteratorToArray($value);
     }
     return parent::setValue((array) $value);
 }
Exemple #2
0
 /**
  * Provide default input rules for this element
  *
  * Attaches the InArray validator.
  *
  * @return array
  */
 public function getInputSpecification()
 {
     $spec = parent::getInputSpecification();
     $spec['validators'][] = $this->getValidator();
     return $spec;
 }