1.20.x entity.class.inc public EntityInterface::access($op, $account = NULL)

Determines whether the given user has access to this entity.

Parameters

string $op: The operation being performed. One of 'view', 'update', 'create' or 'delete'.

User|AnonymousUser|object $account: (optional) The user to check for. Leave it to NULL to check for the global user.

Return value

bool|NULL: Whether access is allowed or not. If the entity type does not specify any access information, NULL is returned.

File

modules/entity/entity.class.inc, line 105
Provides an interface and a base class for entities.

Class

EntityInterface
Defines a common interface for all entity objects.

Code

public function access($op, $account = NULL);