コード例 #1
0
 /**
  * Creates a new view object ready to use
  *
  * @param $view
  * @param array $data
  * @return View
  * @throws \Exception
  */
 public function make($view, array $data = [])
 {
     $location = $this->finder->find($view);
     if (!$location) {
         throw new \Exception(sprintf('View `%s` cannot be found!', $view));
     }
     return new View($location, $view, $data);
 }
コード例 #2
0
 /**
  * 
  * showEditMenue
  * 
  * @param String $ErrorString
  * @param String $StatusString
  */
 public function showEditMenue($ErrorString = "", $StatusString = "")
 {
     if (Controler_Main::getInstance()->getUserLevel() < BACKEND_USERLEVEL) {
         $ControlerStart = new Controler_Start();
         $ControlerStart->start();
         return false;
     }
     $Request = new Request();
     $ID = $Request->getAsInt("MenueID");
     $Menue = Menue::getEmptyInstance();
     $MenueFinder = new MenueFinder();
     $Menue = $MenueFinder->findById($ID);
     $MenueCollection = $MenueFinder->findAll();
     $ContentGroupFinder = new ContentGroupFinder();
     $ContentGroupCollection = $ContentGroupFinder->findAll();
     $ContentFinder = new ContentFinder();
     $ContentCollection = $ContentFinder->findAll();
     $CommandFinder = new CommandFinder();
     $CommandCollection = $CommandFinder->findAll();
     $ViewFinder = new ViewFinder();
     $ViewCollection = $ViewFinder->findAll();
     $Template = Template::getInstance("tpl_BE_MenueEdit.php");
     $Template->assign("Menue", $Menue);
     $Template->assign("MenueCollection", $MenueCollection);
     $Template->assign("ContentGroupCollection", $ContentGroupCollection);
     $Template->assign("ContentCollection", $ContentCollection);
     $Template->assign("CommandCollection", $CommandCollection);
     $Template->assign("ViewCollection", $ViewCollection);
     $Template->assign("MenueId", $ID);
     $Template->assign("ErrorString", $ErrorString);
     $Template->assign("StatusString", $StatusString);
     if (isset($StatusString)) {
         $Template->render(true, true);
     } else {
         $Template->render();
     }
 }