You are here

public function FlagTypePluginInterface::actionAccess in Flag 8.4

Checks whether a user has permission to flag/unflag or not.

Parameters

string $action: The action for which to check permissions, either 'flag' or 'unflag'.

\Drupal\flag\FlagInterface $flag: The flag object.

\Drupal\Core\Session\AccountInterface $account: An AccountInterface object.

\Drupal\Core\Entity\EntityInterface $flaggable: (optional) The flaggable entity.

Return value

\Drupal\Core\Access\AccessResult An AccessResult object.

1 method overrides FlagTypePluginInterface::actionAccess()
FlagTypeBase::actionAccess in src/FlagType/FlagTypeBase.php
Checks whether a user has permission to flag/unflag or not.

File

src/FlagType/FlagTypePluginInterface.php, line 43

Class

FlagTypePluginInterface
Provides an interface for all flag type plugins.

Namespace

Drupal\flag\FlagType

Code

public function actionAccess($action, FlagInterface $flag, AccountInterface $account, EntityInterface $flaggable = NULL);