Ejemplo n.º 1
0
<?php

use Baobab\Helper\Views;
use Balsa\Controllers\DefaultController;
Views::render((new DefaultController())->singlePost());
Ejemplo n.º 2
0
 /**
  * For themes properly structured, we can find the search form template at
  * app/views/parts/misc/search-form.php. We'll also try a blade template if possible. In order, the templates which
  * will be tried will be:
  *
  * /my-theme/app/views/parts/misc/search-form.blade.php
  * /my-theme/app/views/parts/search-form.blade.php
  * /my-theme/app/views/parts/misc/search-form.php
  * /my-theme/app/views/parts/search-form.php
  * /my-theme/searchform.php
  *
  * @param $form The search form
  *
  * @return string
  */
 public function suggestMoreSearchFormTemplates($form)
 {
     ob_start();
     // Try a blade template first and if not found, try standard PHP templates
     $template = Views::pickView(array('parts.misc.search-form', 'parts.search-form'));
     if ($template != null) {
         Views::render(Baobab::blade()->view()->make($template));
     } else {
         locate_template(array('/app/views/parts/misc/search-form.php', '/app/views/parts/search-form.php', 'searchform.php'), true, false);
     }
     $form = ob_get_clean();
     return $form;
 }
Ejemplo n.º 3
0
<?php

use Baobab\Helper\Views;
use Balsa\Controllers\DefaultController;
Views::render((new DefaultController())->error404());
Ejemplo n.º 4
0
<?php

use Baobab\Helper\Views;
use Balsa\Controllers\DefaultController;
Views::render((new DefaultController())->index());