hourElement = new Select('hour'); $this->minuteElement = new Select('minute'); $this->secondElement = new Select('second'); } /** * Set options for DateTimeSelect element. * * Accepted options for DateTimeSelect (plus the ones from DateSelect): * * - hour_attributes: HTML attributes to be rendered with the hour element * - minute_attributes: HTML attributes to be rendered with the minute element * - second_attributes: HTML attributes to be rendered with the second element * - should_show_seconds: if set to true, the seconds select is shown * * @return $this */ public function setOptions(iterable $options) { parent::setOptions($options); if (isset($this->options['hour_attributes'])) { $this->setHourAttributes($this->options['hour_attributes']); } if (isset($this->options['minute_attributes'])) { $this->setMinuteAttributes($this->options['minute_attributes']); } if (isset($this->options['second_attributes'])) { $this->setSecondAttributes($this->options['second_attributes']); } if (isset($this->options['should_show_seconds'])) { $this->setShouldShowSeconds($this->options['should_show_seconds']); } return $this; } public function getHourElement(): Select { return $this->hourElement; } public function getMinuteElement(): Select { return $this->minuteElement; } public function getSecondElement(): Select { return $this->secondElement; } /** @return list