You are here

class AccessGranted in Flag 8.4

Test flag type plugin which denies access.

Plugin annotation


@FlagType(
  id = "test_access_granted",
  title = @Translation("Flag type plugin which always grants access."),
  entity_type = "node",
)

Hierarchy

Expanded class hierarchy of AccessGranted

File

tests/modules/flag_test_plugins/src/Plugin/Flag/AccessGranted.php, line 20

Namespace

Drupal\flag_test_plugins\Plugin\Flag
View source
class AccessGranted extends EntityFlagType {

  /**
   * {@inheritdoc}
   */
  public function actionAccess($action, FlagInterface $flag, AccountInterface $account, EntityInterface $flaggable = NULL) {
    return AccessResult::allowed();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AccessGranted::actionAccess public function Checks whether a user has permission to flag/unflag or not. Overrides EntityFlagType::actionAccess
EntityFlagType::$entityType protected property The entity type defined in plugin definition.
EntityFlagType::$entityTypeManager protected property The entity type manager.
EntityFlagType::actionPermissions public function Returns the permissions available to this flag type. Overrides FlagTypeBase::actionPermissions 1
EntityFlagType::buildConfigurationForm public function Provides a form for this action link plugin settings. Overrides FlagTypeBase::buildConfigurationForm 1
EntityFlagType::create public static function Creates an instance of the plugin. Overrides FlagTypeBase::create
EntityFlagType::defaultConfiguration public function Gets default configuration for this plugin. Overrides FlagTypeBase::defaultConfiguration 1
EntityFlagType::getExtraPermissionsOptions protected function Defines options for extra permissions. Overrides FlagTypeBase::getExtraPermissionsOptions 2
EntityFlagType::getExtraPermissionsOwner protected function Defines permissions for the 'owner' set of additional action permissions. 1
EntityFlagType::isAddEditForm public function Determines if the given form operation is add or edit. 1
EntityFlagType::isFlaggableOwnable protected function Determines if the flaggable associated with the flag supports ownership. 1
EntityFlagType::showAsField public function Returns the show as field setting.
EntityFlagType::showContextualLink public function Returns the show on contextual link setting.
EntityFlagType::showInLinks public function Return the show in links setting given a view mode.
EntityFlagType::showOnForm public function Returns the show on form setting.
EntityFlagType::submitConfigurationForm public function Handles the form submit for this action link plugin. Overrides FlagTypeBase::submitConfigurationForm 1
EntityFlagType::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides FlagTypeBase::__construct
FlagTypeBase::$moduleHandler protected property The module handler.
FlagTypeBase::calculateDependencies public function
FlagTypeBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
FlagTypeBase::hasExtraPermission protected function Determines whether the flag is set to have the extra permissions set.
FlagTypeBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
FlagTypeBase::validateConfigurationForm public function Handles the validation for the action link plugin settings form. Overrides PluginFormInterface::validateConfigurationForm
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.