Пример #1
0
 /**
  * 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);
 }
Пример #2
0
 /**
  * Method to test getValue().
  *
  * @return void
  *
  * @covers Windwalker\Html\Option::getValue
  */
 public function testGetAndSetValue()
 {
     $this->instance->setValue('sunflower');
     $this->assertEquals('sunflower', $this->instance->getValue());
 }
Пример #3
0
 /**
  * isChecked
  *
  * @param  Option $option
  *
  * @return  bool
  */
 protected function isChecked(Option $option)
 {
     return in_array($option->getValue(), (array) $this->getChecked());
 }