/** * Accepted options for Captcha: * - captcha: a valid Zend\Captcha\AdapterInterface * * @param array|\Traversable $options * @return Captcha */ public function setOptions($options) { parent::setOptions($options); if (isset($options['captcha'])) { $this->setCaptcha($options['captcha']); } return $this; }
/** * Set options for an element. Accepted options are: * - label: label to associate with the element * - label_attributes: attributes to use when the label is rendered * - value_options: list of values and labels for the select options * * @param array|\Traversable $options * @return Select|ElementInterface * @throws Exception\InvalidArgumentException */ public function setOptions($options) { parent::setOptions($options); if (isset($this->options['value_options'])) { $this->setValueOptions($this->options['value_options']); } // Alias for 'value_options' if (isset($this->options['options'])) { $this->setValueOptions($this->options['options']); } return $this; }
/** * Accepted options for MultiCheckbox: * - use_hidden_element: do we render hidden element? * - unchecked_value: value for checkbox when unchecked * - checked_value: value for checkbox when checked * * @param array|\Traversable $options * @return Checkbox */ public function setOptions($options) { parent::setOptions($options); if (isset($options['use_hidden_element'])) { $this->setUseHiddenElement($options['use_hidden_element']); } if (isset($options['unchecked_value'])) { $this->setUncheckedValue($options['unchecked_value']); } if (isset($options['checked_value'])) { $this->setCheckedValue($options['checked_value']); } return $this; }