You are here

public function ConfigPagesValueAccess::__construct in Config Pages 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/Condition/ConfigPagesValueAccess.php \Drupal\config_pages\Plugin\Condition\ConfigPagesValueAccess::__construct()

ConfigPagesValueAccess constructor.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\config_pages\ConfigPagesLoaderServiceInterface $configPagesLoader: The ConfigPages loader service.

\Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager: The entity field manager.

Overrides ConditionPluginBase::__construct

File

src/Plugin/Condition/ConfigPagesValueAccess.php, line 58

Class

ConfigPagesValueAccess
Provides a 'Access by ConfigPage field value' condition.

Namespace

Drupal\config_pages\Plugin\Condition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigPagesLoaderServiceInterface $configPagesLoader, EntityFieldManagerInterface $entityFieldManager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->configPagesLoader = $configPagesLoader;
  $this->entityFieldManager = $entityFieldManager;
  $this->allowedFieldTypes = [
    'string',
    'boolean',
    'decimal',
    'datetime',
    'integer',
    'list_integer',
  ];
}