EntityAccessDeniedHttpException
class EntityAccessDeniedHttpException extends CacheableAccessDeniedHttpException implements ResourceIdentifierInterface (View source)
| internal | JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it. |
Enhances the access denied exception with information about the entity.
Traits
Provides dependency injection friendly methods for serialization.
Used to associate an object like an exception to a particular resource.
Trait for \Drupal\Core\Cache\CacheableDependencyInterface.
Properties
| protected string[] | $cacheContexts | Cache contexts. |
from CacheableDependencyTrait |
| protected string[] | $cacheTags | Cache tags. |
from CacheableDependencyTrait |
| protected int | $cacheMaxAge | Cache max-age. |
from CacheableDependencyTrait |
| protected array | $_serviceIds | An array of service IDs keyed by property name used for serialization. |
from DependencySerializationTrait |
| protected array | $_entityStorages | An array of entity type IDs keyed by the property name of their storages. |
from DependencySerializationTrait |
| protected ResourceIdentifier | $resourceIdentifier | A ResourceIdentifier object. |
from ResourceIdentifierTrait |
| protected ResourceType | $resourceType | The JSON:API resource type of the identified resource object. |
from ResourceIdentifierTrait |
| protected array | $error | The error which caused the 403. |
Methods
Sets cacheability; useful for value object constructors.
EntityAccessDeniedHttpException constructor.
Returns the error.
Details
protected $this
setCacheability(CacheableDependencyInterface $cacheability)
Sets cacheability; useful for value object constructors.
getCacheTags()
{@inheritdoc}
getCacheContexts()
{@inheritdoc}
getCacheMaxAge()
{@inheritdoc}
__construct(EntityInterface|null $entity, AccessResultInterface $entity_access, string $pointer, $message = 'The current user is not allowed to GET the selected resource.', string $relationship_field = NULL, Exception $previous = NULL, $code = 0)
EntityAccessDeniedHttpException constructor.
__sleep()
{@inheritdoc}
__wakeup()
{@inheritdoc}
getId()
{@inheritdoc}
getTypeName()
{@inheritdoc}
getResourceType()
{@inheritdoc}
array
getError()
Returns the error.