You are here

protected function EntityFlagType::getExtraPermissionsOptions in Flag 8.4

Defines options for extra permissions.

Return value

array An array of options suitable for FormAPI.

Overrides FlagTypeBase::getExtraPermissionsOptions

3 calls to EntityFlagType::getExtraPermissionsOptions()
CommentFlagType::getExtraPermissionsOptions in src/Plugin/Flag/CommentFlagType.php
Defines options for extra permissions.
EntityFlagType::buildConfigurationForm in src/Plugin/Flag/EntityFlagType.php
Provides a form for this action link plugin settings.
UserFlagType::getExtraPermissionsOptions in src/Plugin/Flag/UserFlagType.php
Defines options for extra permissions.
2 methods override EntityFlagType::getExtraPermissionsOptions()
CommentFlagType::getExtraPermissionsOptions in src/Plugin/Flag/CommentFlagType.php
Defines options for extra permissions.
UserFlagType::getExtraPermissionsOptions in src/Plugin/Flag/UserFlagType.php
Defines options for extra permissions.

File

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

Class

EntityFlagType
Provides a flag type for all entity types.

Namespace

Drupal\flag\Plugin\Flag

Code

protected function getExtraPermissionsOptions() {
  $options = parent::getExtraPermissionsOptions();
  if ($this
    ->isFlaggableOwnable()) {
    $options['owner'] = $this
      ->t("Permissions based on ownership of the flaggable item. For example, only allow users to flag items they own.");
  }
  return $options;
}