示例#1
0
 public function testHasContent()
 {
     $this->_init('Kwf_Component_Output_HasContent_Component');
     $output = new Kwf_Component_Renderer();
     $value = $output->renderMaster(Kwf_Component_Data_Root::getInstance());
     $this->assertRegExp('#root #', $value);
 }
示例#2
0
 /**
  * Render the component
  *
  * Usually only used internally or for debugging
  *
  * @param bool if view cache should be used, if null config setting will be used
  * @param bool if master should be rendered
  * @return string
  */
 public function render($enableCache = null, $renderMaster = false, &$hasDynamicParts = false)
 {
     $output = new Kwf_Component_Renderer();
     if ($enableCache !== null) {
         $output->setEnableCache($enableCache);
     }
     if ($renderMaster) {
         $hasDynamicParts = true;
         return $output->renderMaster($this);
     } else {
         return $output->renderComponent($this, $hasDynamicParts);
     }
 }