class InaccessibleRecordException in RESTful 7.2
Class InaccessibleRecordException.
@package Drupal\restful\Exception
Hierarchy
- class \Drupal\restful\Exception\RestfulException extends \Drupal\restful\Exception\Exception
- class \Drupal\restful\Exception\InaccessibleRecordException
Expanded class hierarchy of InaccessibleRecordException
8 files declare their use of InaccessibleRecordException
- CacheDecoratedDataProvider.php in src/
Plugin/ resource/ DataProvider/ CacheDecoratedDataProvider.php - Contains \Drupal\restful\Plugin\resource\DataProvider\CacheDecoratedDataProvider.
- DataProviderEntity.php in src/
Plugin/ resource/ DataProvider/ DataProviderEntity.php - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity.
- DataProviderPlug.php in src/
Plugin/ resource/ DataProvider/ DataProviderPlug.php - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderPlug.
- DataProviderVariable.php in modules/
restful_example/ src/ Plugin/ resource/ variables/ DataProviderVariable.php - Contains \Drupal\restful_example\Plugin\resource\variables\DataProviderVariable.
- FormatterJsonApi.php in src/
Plugin/ formatter/ FormatterJsonApi.php - Contains \Drupal\restful\Plugin\formatter\FormatterJsonApi.
File
- src/
Exception/ InaccessibleRecordException.php, line 15 - Contains \Drupal\restful\Exception\InaccessibleRecordException.
Namespace
Drupal\restful\ExceptionView source
class InaccessibleRecordException extends RestfulException {
const ERROR_404_MESSAGE = 'Page not found.';
/**
* Instantiates a InaccessibleRecordException object.
*
* @param string $message
* The exception message.
*/
public function __construct($message) {
$show_access_denied = variable_get('restful_show_access_denied', FALSE);
$this->message = $show_access_denied ? $message : static::ERROR_404_MESSAGE;
$this->code = $show_access_denied ? 403 : 404;
$this->instance = $show_access_denied ? 'help/restful/problem-instances-forbidden' : 'help/restful/problem-instances-not-found';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
InaccessibleRecordException:: |
constant | |||
InaccessibleRecordException:: |
public | function | Instantiates a InaccessibleRecordException object. | |
RestfulException:: |
protected | property | Exception description. | 4 |
RestfulException:: |
protected | property | Array keyed by the field name, and array of error messages as value. | |
RestfulException:: |
protected | property | Array of extra headers to set when throwing an exception. | |
RestfulException:: |
protected | property | Defines the instance resource. | 13 |
RestfulException:: |
public | function | Add an error per field. | |
RestfulException:: |
final public | function | Gets the description of the exception. | |
RestfulException:: |
public | function | Return an array with all the errors. | |
RestfulException:: |
public | function | Get the associative array of headers. | |
RestfulException:: |
public | function | Get the URL to the error for the particular case. | |
RestfulException:: |
public | function | Return a string to the common problem type. | |
RestfulException:: |
public | function | Set a header. |