public function setUp($componentClass = null)
 {
     parent::setUp();
     if ($componentClass) {
         $this->_init($componentClass);
     }
     Kwf_Component_Data_Root::setShowInvisible(false);
 }
Beispiel #2
0
 public function testMaster()
 {
     Kwf_Component_Data_Root::setShowInvisible(true);
     $t = $this->_root->getChildComponent('_test');
     $html = $t->render(null, true);
     $this->assertContains('foo', $html);
     Kwf_Component_Data_Root::setShowInvisible(false);
     $html = $t->render(null, true);
     $this->assertContains('bar', $html);
 }
 public function openPreviewAction()
 {
     $page = Kwf_Component_Data_Root::getInstance()->getComponentById($this->_getParam('page_id'), array('ignoreVisible' => true));
     if (!$page) {
         throw new Kwf_Exception_Client(trlKwf('Page not found'));
     }
     Kwf_Component_Data_Root::setShowInvisible(true);
     //required to get correct url for eg. FirstChildPage with invisible children
     header('Location: ' . $page->getPreviewUrl());
     exit;
 }