'true', 'autoPlay' => 'true', 'autoPlayDelay' => 3000, 'pauseOnHover' => 'true', 'stopAtAction' => 'true', ]; protected function _initElements() { $this->_addBoolCheckbox('cycle', ['label' => 'Cycle', 'decoration' => 'simple']); $this->_addBoolCheckbox('autoPlay', ['label' => 'Auto Play', 'decoration' => 'simple']); $this->addElement( 'text', 'autoPlayDelay', ['label' => 'Auto Play Delay (ms)', 'required' => true, 'validators' => ['Int']] ); $this->_addBoolCheckbox('pauseOnHover', ['label' => 'Pause On Hover', 'decoration' => 'simple']); $this->_addBoolCheckbox('stopAtAction', ['label' => 'Stop At Action', 'decoration' => 'simple']); return $this; } /** * @param string $name * @param array $options * @return ConfigForm */ protected function _addBoolCheckbox($name, array $options) { $extendedOptions = [ 'checkedValue' => 'true', 'uncheckedValue' => 'false', ]; $options = array_merge($options, $extendedOptions); $this->addElement('checkbox', $name, $options); return $this; } }