public function createChildControls()
{
if ($tpl = $this->getTemplate()) {
foreach ($tpl->getDirective() as $name => $value) {
if (is_string($value)) {
$this->setSubProperty($name, $value);
} else {
throw new TConfigurationException('templatecontrol_directive_invalid', get_class($this), $name);
}
}
$tpl->instantiateIn($this);
}
}