Pop\Form\Element::isCheckbox PHP Method

isCheckbox() public method

Get whether the form element object is a checkbox element.
public isCheckbox ( ) : boolean
return boolean
    public function isCheckbox()
    {
        return get_class($this) == 'Pop\\Form\\Element\\Checkbox';
    }

Usage Example

Exemplo n.º 1
0
 public function testElementType()
 {
     $e = new Element('text', 'email');
     $this->assertFalse($e->isCaptcha());
     $this->assertFalse($e->isCheckbox());
     $this->assertFalse($e->isCsrf());
     $this->assertFalse($e->isRadio());
     $this->assertFalse($e->isSelect());
     $this->assertFalse($e->isTextarea());
 }