function __construct()
 {
     parent::__construct();
     Loader::helper('Url');
     View::registerFunction('baseUrl', 'baseUrl');
     $this->account = Request::getParameter('account');
     $this->project = Request::getParameter('project');
 }
 function __construct()
 {
     parent::__construct();
     Loader::helper('Url');
     View::registerFunction('baseUrl', 'baseUrl');
     $this->validation = Loader::library('Validation');
     $this->validation->load('Account');
     if (!$this->validation->run()) {
         $errors = $this->validation->error();
         foreach ($errors as $key => $value) {
             if (!empty($value)) {
                 ErrorManager::throwCustomException(500, $value);
             }
         }
     }
 }
Example #3
0
function registerFunction()
{
    Loader::helper('Url');
    \Foundation\Support\Facades\View::registerFunction('baseUrl', 'baseUrl');
}