public function ensureChildControls()
{
if (!($this->_flags & self::IS_CHILD_CREATED) && !($this->_flags & self::IS_CREATING_CHILD)) {
try {
$this->_flags |= self::IS_CREATING_CHILD;
if (isset($this->_rf[self::RF_ADAPTER])) {
$this->_rf[self::RF_ADAPTER]->createChildControls();
} else {
$this->createChildControls();
}
$this->_flags &= ~self::IS_CREATING_CHILD;
$this->_flags |= self::IS_CHILD_CREATED;
} catch (Exception $e) {
$this->_flags &= ~self::IS_CREATING_CHILD;
$this->_flags |= self::IS_CHILD_CREATED;
throw $e;
}
}
}