You are here

public function EntityFlagType::actionPermissions in Flag 8.4

Returns the permissions available to this flag type.

Parameters

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

Return value

array An array of permissions.

Overrides FlagTypeBase::actionPermissions

1 call to EntityFlagType::actionPermissions()
CommentFlagType::actionPermissions in src/Plugin/Flag/CommentFlagType.php
Returns the permissions available to this flag type.
1 method overrides EntityFlagType::actionPermissions()
CommentFlagType::actionPermissions in src/Plugin/Flag/CommentFlagType.php
Returns the permissions available to this flag type.

File

src/Plugin/Flag/EntityFlagType.php, line 263

Class

EntityFlagType
Provides a flag type for all entity types.

Namespace

Drupal\flag\Plugin\Flag

Code

public function actionPermissions(FlagInterface $flag) {
  $permissions = parent::actionPermissions($flag);

  // Define additional permissions.
  if ($this
    ->hasExtraPermission('owner')) {
    $permissions += $this
      ->getExtraPermissionsOwner($flag);
  }
  return $permissions;
}