コード例 #1
0
ファイル: MenuView.php プロジェクト: piiskop/pstk
 /**
  * This function builds a menu.
  *
  * @access public
  * @author k
  * @param int $parameters['type']
  *        	the type of the menu
  * @return string the menu
  */
 public static function buildMenu($parameters)
 {
     require_once dirname(__FILE__) . '/MenuElement.php';
     $menuElements = \tuts\MenuElement::getListOfTypeMenuElement(array('forAutocompletion' => false, 'type' => $parameters['type']));
     $menu = '';
     foreach ($menuElements as $idMenuElement => $menuElement) {
         require_once dirname(__FILE__) . '/MenuElementView.php';
         $menu .= \tuts\MenuElementView::buildMenuElement(array('menuElement' => $menuElement['object'], 'type' => $parameters['type']));
     }
     return $menu;
 }
コード例 #2
0
ファイル: MenuView.php プロジェクト: piiskop/pstk
 /**
  * This function build a menu.
  */
 public static function buildMenu($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_it(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('from-design-to-web-template.html');
     require_once dirname(__FILE__) . '/MenuElement.php';
     $menuElements = \tuts\MenuElement::getListOfTypeMenuElement(array('forAutocompletion' => false, 'type' => $parameters['type']));
     $menu = '';
     foreach ($menuElements as $idMenuElement => $menuElement) {
         require_once dirname(__FILE__) . '/MenuElementView.php';
         $menu .= \tuts\MenuElementView::buildMenuElement(array('menuElement' => $menuElement['object'], 'type' => $parameters['type']));
     }
     return $menu;
 }
コード例 #3
0
ファイル: index.php プロジェクト: piiskop/pstk
 /**
  * This function is the stn.
  *
  * @access public
  * @author kalmer:piiskop <*****@*****.**>
  * @uses View for the visual part
  */
 public static function start()
 {
     require_once dirname(__FILE__) . '/MenuElement.php';
     $menuElements = \tuts\MenuElement::getListOfTypeMenuElement(array('forAutocompletion' => false));
     $menu = '';
     foreach ($menuElements as $idMenuElement => $menuElement) {
         require_once dirname(__FILE__) . '/MenuElementView.php';
         $menu .= \tuts\MenuElementView::buildMenuElement(array('menuElement' => $menuElement['object']));
     }
     require_once dirname(__FILE__) . '/Service.php';
     $services = \tuts\Service::getListOfTypeService(array('forAutocompletion' => false));
     // 		echo ' 41: <pre>';var_dump($services); echo '</pre>';
     $blockOfServices = '';
     foreach ($services as $idService => $service) {
         require_once dirname(__FILE__) . '/ServiceView.php';
         $blockOfServices .= \tuts\ServiceView::buildService(array('service' => $service['object']));
     }
     require_once dirname(__FILE__) . '/View.php';
     echo \tuts\View::buildView(array('menu' => $menu, 'services' => $blockOfServices));
 }