Example #1
0
 public function testSetData()
 {
     $tools = new View\Tools();
     $aCredentials = Model\Auth::getCredentials('test_user');
     //var_dump($aCredentials);
     $this->assertEquals($tools->render(), '<strong>Tools</strong>');
 }
Example #2
0
     $structures = new Model\StructuresDo();
     $structures->loadFromFile(conf::$DATA_PATH);
     $headerMenuOu = new View\HeaderMenu();
     $headerMenuOu->setType('menu');
     $toolsOu = new View\Tools();
     $toolsOu->setLogin($_SESSION['login']);
     $toolsOu->setRol($_SESSION['rol']);
     $contentOu = new View\ContentEditIndex();
     //$contentOu->setActionType('index');
     $contentOu->setStructures($structures);
     //$contentOu->setTODO($estructuras);
     $skeletonOu = new View\BaseSkeleton();
     $skeletonOu->setBodyClass('indexContent');
     $skeletonOu->setHeadTitle('Manage content type');
     $skeletonOu->setHeaderMenu($headerMenuOu->render());
     $skeletonOu->setTools($toolsOu->render());
     break;
 case 'delete':
 case 'list_contents':
     $id = $_GET['id'];
     @($titleSearch = $_GET['s']);
     $numPage = isset($_GET['p']) ? (int) $_GET['p'] : 0;
     $bResult = isset($_GET['r']) && $_GET['r'] === 'ko' ? false : true;
     $headerMenuOu = new View\HeaderMenu();
     $headerMenuOu->setType('backContent');
     $contentOu = new View\ContentEditListContent();
     $contentOu->setId($id);
     $contentOu->setTitleSeach($titleSearch);
     $contentOu->load();
     $contentLoader = new Model\ContentLoader();
     $contentLoader->setId($id);