tidy_parser.php
private function attachLabels($widgets_by_id, $labels)
    {
        foreach ($labels as $label) {
            $for = $label->getFor();
            if ($for and isset($widgets_by_id[$for])) {
                $text = $label->getText();
                foreach ($widgets_by_id[$for] as $widget) {
                    $widget->setLabel($text);
                }
            }
        }
    }
private function attachLabels($widgets_by_id, $labels)
    {
        foreach ($labels as $label) {
            $for = $label->getFor();
            if ($for and isset($widgets_by_id[$for])) {
                $text = $label->getText();
                foreach ($widgets_by_id[$for] as $widget) {
                    $widget->setLabel($text);
                }
            }
        }
    }
Called at the end of a parse run.
Attaches any non-wrapping labels to their form elements.

@param array $widgets_by_id     Cached SimpleTag hash.
@param array $labels            SimpleTag label elements.