/** * createLabel * * @param Option $option * * @return Htmlelement */ protected function createLabel($option) { $attrs = $option->getAttributes(); $attrs['id'] = $option->getAttribute('id') . '-label'; $attrs['for'] = $option->getAttribute('id'); $attrs['value'] = null; $attrs['checked'] = null; $attrs['type'] = null; $attrs['name'] = null; return new HtmlElement('label', $option->getContent(), $attrs); }
/** * Method to test getValue(). * * @return void * * @covers Windwalker\Html\Option::getValue */ public function testGetAndSetValue() { $this->instance->setValue('sunflower'); $this->assertEquals('sunflower', $this->instance->getValue()); }
/** * isChecked * * @param Option $option * * @return bool */ protected function isChecked(Option $option) { return in_array($option->getValue(), (array) $this->getChecked()); }