setLabelAttributes() public method

Set the attributes of the label of the form element object.
public setLabelAttributes ( array $attribs ) : Element
$attribs array
return Element
コード例 #1
0
ファイル: ElementTest.php プロジェクト: nicksagona/PopPHP
 public function testSetAndGetLabelAttributes()
 {
     $e = new Element('text', 'email');
     $e->setLabel('Email:');
     $e->setLabelAttributes(array('class' => 'label-class'));
     $attribs = $e->getLabelAttributes();
     $this->assertEquals('label-class', $attribs['class']);
 }