setLabelAttributes() public method

Set the attributes of the label of the form element object.
public setLabelAttributes ( array $attribs ) : Element
$attribs array
return Element
Exemplo n.º 1
0
 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']);
 }