Pop\Form\Element::isRadio PHP Method

isRadio() public method

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

Usage Example

コード例 #1
0
ファイル: ElementTest.php プロジェクト: nicksagona/PopPHP
 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());
 }