public function FlagInterface::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'.
AccountInterface $account: (optional) An AccountInterface object.
\Drupal\Core\Entity\EntityInterface $flaggable: (optional) The flaggable entity.
Return value
\Drupal\Core\Access\AccessResult An AccessResult object.
1 method overrides FlagInterface::actionAccess()
- Flag::actionAccess in src/
Entity/ Flag.php - Checks whether a user has permission to flag/unflag or not.
File
- src/
FlagInterface.php, line 280
Class
- FlagInterface
- Defines the interface for Flag entities.
Namespace
Drupal\flagCode
public function actionAccess($action, AccountInterface $account = NULL, EntityInterface $flaggable = NULL);