forked from EasyCorp/EasyAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForbiddenActionException.php
More file actions
26 lines (22 loc) · 938 Bytes
/
ForbiddenActionException.php
File metadata and controls
26 lines (22 loc) · 938 Bytes
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
<?php
/*
* This file is part of the EasyAdminBundle.
*
* (c) Javier Eguiluz <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JavierEguiluz\Bundle\EasyAdminBundle\Exception;
/**
* @author Javier Eguiluz <[email protected]>
*/
class ForbiddenActionException extends BaseException
{
public function __construct(array $parameters = array())
{
$errorMessage = sprintf('The requested "%s" action is not allowed for the "%s" entity.', $parameters['action'], $parameters['entity']);
$proposedSolution = sprintf('Remove the "%s" action from the "disabled_actions" option, which can be configured globally for the entire backend or locally for the "%s" entity.', $parameters['action'], $parameters['entity']);
parent::__construct($errorMessage, $proposedSolution, 403);
}
}