class SystemQueryParam in ThemeKey 8
Provides a 'query param' property.
Plugin annotation
@Property(
id = "system:query_param",
name = @Translation("System: Query Parameter"),
description = @Translation("Every single query parameter other than 'q' and its value, if present. Note that values are url decoded. Example: '?q=node&foo=bar&dummy&filter=tid%3A27' will cause three entries 'foo=bar', 'dummy' and 'filter=tid:27'. For 'q', see property drupal:get_q."),
page_cache_compatible = TRUE,
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\themekey\Plugin\SingletonPluginBase implements ContainerFactoryPluginInterface
- class \Drupal\themekey\PropertyBase implements PropertyInterface
- class \Drupal\themekey\Plugin\Property\SystemQueryParam
- class \Drupal\themekey\PropertyBase implements PropertyInterface
- class \Drupal\themekey\Plugin\SingletonPluginBase implements ContainerFactoryPluginInterface
Expanded class hierarchy of SystemQueryParam
File
- src/
Plugin/ Property/ SystemQueryParam.php, line 22 - Contains \Drupal\themekey\Plugin\Property\SystemQueryParam.
Namespace
Drupal\themekey\Plugin\PropertyView source
class SystemQueryParam extends PropertyBase {
/**
* @return array
* array of system:query_param values
*/
public function getValues() {
// TODO use safe values from RouteMatch
$filtered_params = array();
$query_params = $_GET;
// unset($query_params['q']);
foreach ($query_params as $key => $value) {
$filtered_params[] = $key . (!empty($value) ? '=' . $value : '');
$filtered_params[$key] = !empty($value) ? $value : '';
}
return $filtered_params;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |
PropertyBase:: |
protected | property | ||
PropertyBase:: |
public | function | ||
PropertyBase:: |
public | function |
Return the Description of the ThemeKey property. Overrides PropertyInterface:: |
|
PropertyBase:: |
public | function |
Return the name of the ThemeKey property. Overrides PropertyInterface:: |
|
PropertyBase:: |
public | function | ||
PropertyBase:: |
public | function | ||
PropertyBase:: |
public | function | ||
SingletonPluginBase:: |
protected static | property | ||
SingletonPluginBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
SystemQueryParam:: |
public | function |
Overrides PropertyInterface:: |