Pop\Form\Element::getLabelAttributes PHP Method

getLabelAttributes() public method

Get the attributes of the form element object label.
public getLabelAttributes ( ) : array
return array
    public function getLabelAttributes()
    {
        return $this->labelAttributes;
    }

Usage Example

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']);
 }