public function setValue($value) { if (!is_array($value)) { throw new InvalidArgumentException('Expecting $value to be an array!'); } $this->dateInput->setValue($value); $this->timeInput->setValue($value); parent::setValue($value); }
function setValue($value) { if (!is_array($value)) { trigger_error('Expecting $value to be an array!', E_USER_ERROR); } $this->dateInput->setValue($value); $this->timeInput->setValue($value); parent::setValue($value); }
function setValue($value) { if (!is_array($value)) { trigger_error('Expecting $value to be an array!', E_USER_ERROR); } foreach (array('hour', 'minute') as $reqIndex) { if (!isset($value[$reqIndex])) { trigger_error('Missing index "' . $reqIndex . '" in $value!', E_USER_ERROR); } } $this->hourSelect->setSelected($value['hour']); $this->minuteSelect->setSelected($value['minute']); parent::setValue($value); }
public function setValue($value) { if (!is_array($value)) { throw new InvalidArgumentException('Expecting $value to be an array!'); } foreach (['hour', 'minute'] as $reqIndex) { if (!isset($value[$reqIndex])) { throw new rex_exception('Missing index "' . $reqIndex . '" in $value!'); } } $this->hourSelect->setSelected($value['hour']); $this->minuteSelect->setSelected($value['minute']); parent::setValue($value); }
function setValue($value) { if (!is_array($value)) { trigger_error('Expecting $value to be an array!', E_USER_ERROR); } foreach (array('year', 'month', 'day') as $reqIndex) { if (!isset($value[$reqIndex])) { trigger_error('Missing index "' . $reqIndex . '" in $value!', E_USER_ERROR); } } $this->yearSelect->setSelected($value['year']); $this->monthSelect->setSelected($value['month']); $this->daySelect->setSelected($value['day']); parent::setValue($value); }
public function setValue($value) { $this->select->setSelected($value); parent::setValue($value); }