public function render($writer)
{
if (($aid = $this->getForControl()) !== '') {
if ($control = $this->findControl($aid)) {
if ($control->getVisible(true)) {
$this->_forControl = $control->getClientID();
parent::render($writer);
}
} else {
throw new TInvalidDataValueException('label_associatedcontrol_invalid', $aid);
}
} else {
parent::render($writer);
}
}