protected function wire()
    {
        $labels     = (isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] : null;
        $components = (isset($this->indexReverse[self::COMPONENT])) ? $this->indexReverse[self::COMPONENT] : null;

        /* @var Doozr_Form_Service_Component_Formcomponent $child */
        for ($i = 0; $i < count($labels); ++$i) {
            if (isset($components[$i])) {
                $label = $this->getChild($labels[$i]);
                $label->setAttribute('for', $this->getChild($components[$i])->getId());
                $this->addChild($label, $labels[$i]);
            }
        }
    }
protected function wire()
    {
        $labels     = (isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] : null;
        $components = (isset($this->indexReverse[self::COMPONENT])) ? $this->indexReverse[self::COMPONENT] : null;

        /* @var Doozr_Form_Service_Component_Formcomponent $child */
        for ($i = 0; $i < count($labels); ++$i) {
            if (isset($components[$i])) {
                $label = $this->getChild($labels[$i]);
                $label->setAttribute('for', $this->getChild($components[$i])->getId());
                $this->addChild($label, $labels[$i]);
            }
        }
    }
protected function wire ( ) { $ labels = ( isset ( $ this -> indexReverse [ self :: LABEL ] ) ) ? $ this -> indexReverse [ self :: LABEL ] : null ; $ components = ( isset ( $ this -> indexReverse [ self :: COMPONENT ] ) ) ? $ this -> indexReverse [ self :: COMPONENT ] : null ; /* @var Doozr_Form_Service_Component_Formcomponent $child */ for ( $ i = 0 ; $ i < count ( $ labels ) ; ++ $ i ) { if ( isset ( $ components [ $ i ] ) ) { $ label = $ this -> getChild ( $ labels [ $ i ] ) ; $ label -> setAttribute ( 'for' , $ this -> getChild ( $ components [ $ i ] ) -> getId ( ) ) ; $ this -> addChild ( $ label , $ labels [ $ i ] ) ; } } }
Connects the element with the for attribute of the label.

@author Benjamin Carl <opensource@clickalicious.de>
Connects the element with the for attribute of the label .