diff options
Diffstat (limited to 'framework/Web/UI/TControl.php')
-rw-r--r-- | framework/Web/UI/TControl.php | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index d1767d57..34aeb85e 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -1000,20 +1000,44 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable }
/**
- * @return boolean true if the control has been initialized.
+ * @return boolean true if the child control has been initialized.
*/
- public function getIsInitialized()
+ public function getHasChildInitialized()
{
return $this->getControlStage() >= self::CS_CHILD_INITIALIZED;
}
/**
+ * @return boolean true if the onInit event has raised.
+ */
+ public function getHasInitialized()
+ {
+ return $this->getControlStage() >= self::CS_INITIALIZED;
+ }
+
+ /**
* @return boolean true if the control has loaded post data.
*/
public function getHasLoadedPostData()
{
+ return $this->getControlStage() >= self::CS_STATE_LOADED;
+ }
+
+ /**
+ * @return boolean true if the onLoad event has raised.
+ */
+ public function getHasLoaded()
+ {
return $this->getControlStage() >= self::CS_LOADED;
}
+
+ /**
+ * @return boolean true if onPreRender event has raised.
+ */
+ public function getHasPreRendered()
+ {
+ return $this->getControlStage() >= self::CS_PRERENDERED;
+ }
/**
* Returns the named registered object.
@@ -1250,12 +1274,19 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable $control->evaluateDynamicContent();
}
}
-
- if($this instanceof IPostBackDataHandler)
- $this->getPage()->registerPostDataLoader($this);
+ $this->addToPostDataLoader();
}
$this->_stage=self::CS_PRERENDERED;
}
+
+ /**
+ * Add controls implementing IPostBackDataHandler to post data loaders.
+ */
+ protected function addToPostDataLoader()
+ {
+ if($this instanceof IPostBackDataHandler)
+ $this->getPage()->registerPostDataLoader($this);
+ }
/**
* Performs the Unload step for the control and all its child controls.
|