Drupal 8  8.0.2
RequestPath Class Reference
Inheritance diagram for RequestPath:

Public Member Functions

 __construct (AliasManagerInterface $alias_manager, PathMatcherInterface $path_matcher, RequestStack $request_stack, CurrentPathStack $current_path, array $configuration, $plugin_id, array $plugin_definition)
 
 defaultConfiguration ()
 
 buildConfigurationForm (array $form, FormStateInterface $form_state)
 
 submitConfigurationForm (array &$form, FormStateInterface $form_state)
 
 summary ()
 
 evaluate ()
 
 getCacheContexts ()
 
- Public Member Functions inherited from ConditionPluginBase
 __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 CacheableDependencyInterface
 getCacheTags ()
 
 getCacheMaxAge ()
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 

Protected Attributes

 $aliasManager
 
 $pathMatcher
 
 $requestStack
 
 $currentPath
 
- Protected Attributes inherited from ConditionPluginBase
 $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 'Request Path' condition.

( id = "request_path", label = ("Request Path"), )

Constructor & Destructor Documentation

__construct ( AliasManagerInterface  $alias_manager,
PathMatcherInterface  $path_matcher,
RequestStack  $request_stack,
CurrentPathStack  $current_path,
array  $configuration,
  $plugin_id,
array  $plugin_definition 
)

Constructs a RequestPath condition plugin.

Parameters
\Drupal\Core\Path\AliasManagerInterface$alias_managerAn alias manager to find the alias for the current system path.
\Drupal\Core\Path\PathMatcherInterface$path_matcherThe path matcher service.
\Symfony\Component\HttpFoundation\RequestStack$request_stackThe request stack.
\Drupal\Core\Path\CurrentPathStack$current_pathThe current path.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
array$plugin_definitionThe plugin implementation definition.

References Drupal\requestStack().

Here is the call graph for this function:

Member Function Documentation

buildConfigurationForm ( array  $form,
FormStateInterface  $form_state 
)

{}

References t().

Here is the call graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

defaultConfiguration ( )

{Gets default configuration for this plugin.

Returns
array An associative array with the default configuration.
}

Implements ConfigurablePluginInterface.

evaluate ( )

{Evaluates the condition and returns TRUE or FALSE accordingly.

Returns
bool TRUE if the condition has been met, FALSE otherwise.
}

Implements ConditionInterface.

References Drupal\requestStack(), and Unicode\strtolower().

Here is the call graph for this function:

getCacheContexts ( )

{The cache contexts associated with this object.These identify a specific variation/representation of the object.Cache contexts are tokens: placeholders that are converted to cache keys by the service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.

Returns
string[] An array of cache context tokens, used to generate a cache ID.
See Also
::convertTokensToKeys()
}

Implements CacheableDependencyInterface.

submitConfigurationForm ( array &  $form,
FormStateInterface  $form_state 
)

{}

summary ( )

{Provides a human readable summary of the condition's configuration.}

Implements ConditionInterface.

References t().

Here is the call graph for this function:


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