public function setLabel(LabelElement $label)
    {

        $this->label = $label;

        if(($for = $this->getAttribute('id'))) {
            $label->setAttribute('for', $for);
        }

        return $this;

    }
public function setLabel(LabelElement $label)
    {

        $this->label = $label;

        if(($for = $this->getAttribute('id'))) {
            $label->setAttribute('for', $for);
        }

        return $this;

    }
public function setLabel ( LabelElement $ label ) { $ this -> label = $ label ; if ( ( $ for = $ this -> getAttribute ( 'id' ) ) ) { $ label -> setAttribute ( 'for' , $ for ) ; } return $ this ; }
assign label element to this form element
"for" attribute of label is set if form element has an "id" attribute

@param LabelElement $label
@return $this
assign label element to this form element for attribute of label is set if form element has an id attribute