Files
steamwidgets-web/app/controller/_base.php
Daniel Brendel 94353ac3c8 Initial commit
2022-08-16 13:54:30 +02:00

38 lines
632 B
PHP

<?php
/**
* Base controller class
*
* Extend or modify to fit your project needs
*/
class BaseController extends Asatru\Controller\Controller {
/**
* @var string
*/
protected $layout = 'layout';
/**
* Perform base initialization
*
* @param $layout
* @return void
*/
public function __construct($layout = '')
{
if ($layout !== '') {
$this->layout = $layout;
}
}
/**
* A more convenient view helper
*
* @param array $yields
* @param array $attr
* @return Asatru\View\ViewHandler
*/
public function view($yields, $attr = array())
{
return view($this->layout, $yields, $attr);
}
}