forked from ProcessMaker/processmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.php
More file actions
38 lines (32 loc) · 1.21 KB
/
Controller.php
File metadata and controls
38 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace ProcessMaker\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use ProcessMaker\Traits\HasControllerAddons;
/**
* Our base controller. Any shared functionality across all web controllers can go here
*/
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
/**
* Our overridden callAction unsets the parameters used by our middleware since
* controllers don't care about them
* @param string $method
* @param array $parameters
* @return \Symfony\Component\HttpFoundation\Response
*/
public function callAction($method, $parameters)
{
// Handled by the SetWorkspace middleware
unset($parameters['workspace']);
// Handled by the SetSkin middleware
unset($parameters['skin']);
// Handled by the SetLocale middleware
unset($parameters['lang']);
// Now call our parent callAction which will route to the appropriate method
return parent::callAction($method, $parameters);
}
}