From bf66ad7bb36e881f53437491333940d74d77139e Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 25 Jan 2006 11:34:58 +0000 Subject: Changed AssociatedControlID to ForControl --- framework/Web/UI/WebControls/TBaseValidator.php | 6 +++--- framework/Web/UI/WebControls/TLabel.php | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'framework/Web') diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index 5110230b..eeb5d0e8 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -180,13 +180,13 @@ abstract class TBaseValidator extends TLabel implements IValidator } /** - * This method overrides the parent implementation to forbid setting AssociatedControlID. + * This method overrides the parent implementation to forbid setting ForControl. * @param string the associated control ID * @throws TNotSupportedException whenever this method is called */ - public function setAssociatedControlID($value) + public function setForControl($value) { - throw new TNotSupportedException('basevalidator_associatedcontrolid_unsupported',get_class($this)); + throw new TNotSupportedException('basevalidator_forcontrol_unsupported',get_class($this)); } /** diff --git a/framework/Web/UI/WebControls/TLabel.php b/framework/Web/UI/WebControls/TLabel.php index 5a53def4..89783bd5 100644 --- a/framework/Web/UI/WebControls/TLabel.php +++ b/framework/Web/UI/WebControls/TLabel.php @@ -18,7 +18,7 @@ * TLabel will render the contents enclosed within its component tag * if {@link setText Text} is empty. * To use TLabel as a form label, associate it with a control by setting the - * {@link setAssociatedControlID AssociatedControlID} property. + * {@link setForControl ForControl} property. * The associated control must be locatable within the label's naming container. * * Note, {@link setText Text} will NOT be encoded for rendering. @@ -36,7 +36,7 @@ class TLabel extends TWebControl */ protected function getTagName() { - return ($this->getAssociatedControlID()==='')?'span':'label'; + return ($this->getForControl()==='')?'span':'label'; } /** @@ -46,7 +46,7 @@ class TLabel extends TWebControl */ protected function addAttributesToRender($writer) { - if(($aid=$this->getAssociatedControlID())!=='') + if(($aid=$this->getForControl())!=='') { if($control=$this->findControl($aid)) $writer->addAttribute('for',$control->getClientID()); @@ -87,9 +87,9 @@ class TLabel extends TWebControl /** * @return string the associated control ID */ - public function getAssociatedControlID() + public function getForControl() { - return $this->getViewState('AssociatedControlID',''); + return $this->getViewState('ForControl',''); } /** @@ -97,9 +97,9 @@ class TLabel extends TWebControl * The control must be locatable via {@link TControl::findControl} using the ID. * @param string the associated control ID */ - public function setAssociatedControlID($value) + public function setForControl($value) { - $this->setViewState('AssociatedControlID',$value,''); + $this->setViewState('ForControl',$value,''); } } -- cgit v1.2.3