Drupal 8  8.0.2
ConditionPluginBase Class Reference
Inheritance diagram for ConditionPluginBase:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 isNegated ()
 
 buildConfigurationForm (array $form, FormStateInterface $form_state)
 
 validateConfigurationForm (array &$form, FormStateInterface $form_state)
 
 submitConfigurationForm (array &$form, FormStateInterface $form_state)
 
 execute ()
 
 getConfiguration ()
 
 setConfiguration (array $configuration)
 
 defaultConfiguration ()
 
 calculateDependencies ()
 
 setExecutableManager (ExecutableManagerInterface $executableManager)
 
- Public Member Functions inherited from ExecutablePluginBase
 getConfigDefinitions ()
 
 getConfigDefinition ($key)
 
 getConfig ()
 
 setConfig ($key, $value)
 
- Public Member Functions inherited from ContextAwarePluginBase
 getContext ($name)
 
 setContext ($name, ComponentContextInterface $context)
 
 setContextValue ($name, $value)
 
 getContextMapping ()
 
 setContextMapping (array $context_mapping)
 
 getContextDefinitions ()
 
 getContextDefinition ($name)
 
- Public Member Functions inherited from ContextAwarePluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 getContextDefinitions ()
 
 getContextDefinition ($name)
 
 getContexts ()
 
 getContext ($name)
 
 setContext ($name, ContextInterface $context)
 
 getContextValues ()
 
 getContextValue ($name)
 
 setContextValue ($name, $value)
 
 validateContexts ()
 
- Public Member Functions inherited from PluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 getPluginId ()
 
 getBaseId ()
 
 getDerivativeId ()
 
 getPluginDefinition ()
 
- Public Member Functions inherited from ConditionInterface
 evaluate ()
 
 summary ()
 
- Public Member Functions inherited from CacheableDependencyInterface
 getCacheContexts ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 

Protected Attributes

 $executableManager
 
- Protected Attributes inherited from ContextAwarePluginBase
 $context = []
 
- Protected Attributes inherited from PluginBase
 $pluginId
 
 $pluginDefinition
 
 $configuration
 

Additional Inherited Members

- Data Fields inherited from PluginBase
const DERIVATIVE_SEPARATOR = ':'
 
- Protected Member Functions inherited from ContextAwarePluginBase
 createContextFromConfiguration (array $context_configuration)
 
 contextHandler ()
 
- Protected Member Functions inherited from ContextAwarePluginBase
 createContextFromConfiguration (array $context_configuration)
 

Detailed Description

Provides a basis for fulfilling contexts for condition plugins.

See Also

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition 
)

{}

References ConditionPluginBase\setConfiguration().

Here is the call graph for this function:

Member Function Documentation

buildConfigurationForm ( array  $form,
FormStateInterface  $form_state 
)

{Form constructor.Plugin forms are embedded in other forms. In order to know where the plugin form is located in the parent form, #parents and #array_parents must be known, but these are not available during the initial build phase. In order to have these properties available when building the plugin form's elements, let this method return a form element that has a #process callback and build the rest of the form in the callback. By the time the callback is executed, the element's #parents and #array_parents properties will have been set by the form API. For more documentation on #parents and #array_parents, see .

Parameters
array$formAn associative array containing the initial structure of the plugin form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the complete form.
Returns
array The form structure.
}

Implements PluginFormInterface.

References FormStateInterface\getTemporaryValue(), and t().

Here is the call graph for this function:

calculateDependencies ( )

{Calculates dependencies for the configured plugin.Dependencies are saved in the plugin's configuration entity and are used to determine configuration synchronization order. For example, if the plugin integrates with specific user roles, this method should return an array of dependencies listing the specified roles.

Returns
array An array of dependencies grouped by type (config, content, module, theme). For example:
array(
'config' => array('user.role.anonymous', 'user.role.authenticated'),
'content' => array('node:article:f0a189e6-55fb-47fb-8005-5bef81c44d6d'),
'module' => array('node', 'user'),
'theme' => array('seven'),
);
See Also
::getConfigDependencyName()
}

Implements DependentPluginInterface.

defaultConfiguration ( )

{Gets default configuration for this plugin.

Returns
array An associative array with the default configuration.
}

Implements ConfigurablePluginInterface.

Referenced by ConditionPluginBase\setConfiguration().

Here is the caller graph for this function:

execute ( )

{Executes the plugin.}

Implements ExecutableInterface.

getConfiguration ( )

{Gets this plugin's configuration.

Returns
array An array of this plugin's configuration.
}

Implements ConfigurablePluginInterface.

References PluginInspectionInterface\getPluginId().

Here is the call graph for this function:

isNegated ( )

{Determines whether condition result will be negated.

Returns
bool Whether the condition result will be negated.
}

Implements ConditionInterface.

Referenced by UserRole\evaluate(), NodeType\evaluate(), Language\evaluate(), and CurrentThemeCondition\summary().

Here is the caller graph for this function:

setConfiguration ( array  $configuration)

{Sets the configuration for this plugin instance.

Parameters
array$configurationAn associative array containing the plugin's configuration.
}

Implements ConfigurablePluginInterface.

References ConditionPluginBase\defaultConfiguration().

Referenced by ConditionPluginBase\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

setExecutableManager ( ExecutableManagerInterface  $executableManager)

{Sets the executable manager class.

Parameters
\Drupal\Core\Executable\ExecutableManagerInterface$executableManagerThe executable manager.
}

Implements ConditionInterface.

submitConfigurationForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form submission handler.

Parameters
array$formAn associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the complete form.
}

Implements PluginFormInterface.

References FormStateInterface\getValue().

Here is the call graph for this function:

validateConfigurationForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form validation handler.

Parameters
array$formAn associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the complete form.
}

Implements PluginFormInterface.


The documentation for this class was generated from the following file: