Esempio n. 1
0
 function __construct()
 {
     parent::__construct();
     $this->template = new G2_TwigTemplate('templates/template.twig');
     $this->template->user = G()->get_user();
     $this->template->package_url = PACKAGE_URL;
 }
Esempio n. 2
0
 function __construct()
 {
     parent::__construct();
     $css = new G2_Template_Css();
     $css->set_base_folder($this->get_package_dir() . 'skins/default/stylesheets');
     $css->add_external_url('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css');
     $css->add_base_file('main.css');
     $css->set_output_dir('static/css');
     $this->template->css = $css;
     $this->template->title = 'Twig Page Title';
     $this->template->desc = "This is a page built with Stephan Wessels Mvc Framework and integration with Twig";
 }
Esempio n. 3
0
 function __construct()
 {
     G2_User::init();
     parent::__construct();
     $this->template = new G2_TwigTemplate('templates/default.twig');
     $this->template->user = G()->get_user();
     $this->template->admin_url = $this->get_package_uri(true);
     $packages = MVC_Router::getInstance()->get_packages_loaded();
     foreach ($packages as $key => $package) {
         if (!method_exists($package, 'get_admin_controller')) {
             unset($packages[$key]);
             continue;
         }
         if (method_exists($package, 'get_permission') && !Permission::has_permission($package->get_permission())) {
             unset($packages[$key]);
             continue;
         }
         $packages[$key]->link = $this->get_package_uri(true) . 'package/' . $packages[$key]->name;
     }
     $this->template->packages = $packages;
     $this->template->alert = Admin_Alert::get_instance();
 }