class Links in Better Exposed Filters 8.5
Same name in this branch
- 8.5 src/Plugin/better_exposed_filters/filter/Links.php \Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\Links
- 8.5 src/Plugin/better_exposed_filters/sort/Links.php \Drupal\better_exposed_filters\Plugin\better_exposed_filters\sort\Links
- 8.5 src/Plugin/better_exposed_filters/pager/Links.php \Drupal\better_exposed_filters\Plugin\better_exposed_filters\pager\Links
Same name and namespace in other branches
- 8.4 src/Plugin/better_exposed_filters/sort/Links.php \Drupal\better_exposed_filters\Plugin\better_exposed_filters\sort\Links
Radio Buttons sort widget implementation.
Plugin annotation
@BetterExposedFiltersSortWidget(
id = "bef_links",
label = @Translation("Links"),
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\better_exposed_filters\Plugin\BetterExposedFiltersWidgetBase implements BetterExposedFiltersWidgetInterface uses StringTranslationTrait
- class \Drupal\better_exposed_filters\Plugin\better_exposed_filters\sort\SortWidgetBase implements BetterExposedFiltersWidgetInterface uses StringTranslationTrait
- class \Drupal\better_exposed_filters\Plugin\better_exposed_filters\sort\Links
- class \Drupal\better_exposed_filters\Plugin\better_exposed_filters\sort\SortWidgetBase implements BetterExposedFiltersWidgetInterface uses StringTranslationTrait
- class \Drupal\better_exposed_filters\Plugin\BetterExposedFiltersWidgetBase implements BetterExposedFiltersWidgetInterface uses StringTranslationTrait
Expanded class hierarchy of Links
4 string references to 'Links'
- better_exposed_filters.filter.schema.yml in config/
schema/ better_exposed_filters.filter.schema.yml - config/schema/better_exposed_filters.filter.schema.yml
- better_exposed_filters.pager.schema.yml in config/
schema/ better_exposed_filters.pager.schema.yml - config/schema/better_exposed_filters.pager.schema.yml
- better_exposed_filters.sort.schema.yml in config/
schema/ better_exposed_filters.sort.schema.yml - config/schema/better_exposed_filters.sort.schema.yml
- hook_better_exposed_filters_filter_widgets_alter in ./
better_exposed_filters.api.php - Modify the array of BEF display options for an exposed filter.
File
- src/
Plugin/ better_exposed_filters/ sort/ Links.php, line 15
Namespace
Drupal\better_exposed_filters\Plugin\better_exposed_filters\sortView source
class Links extends SortWidgetBase {
/**
* {@inheritdoc}
*/
public function exposedFormAlter(array &$form, FormStateInterface $form_state) {
parent::exposedFormAlter($form, $form_state);
foreach ($this->sortElements as $element) {
if (!empty($form[$element])) {
$form[$element]['#theme'] = 'bef_links';
// Exposed form displayed as blocks can appear on pages other than
// the view results appear on. This can cause problems with
// select_as_links options as they will use the wrong path. We
// provide a hint for theme functions to correct this.
$form[$element]['#bef_path'] = $this
->getExposedFormActionUrl($form_state);
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BetterExposedFiltersWidgetBase:: |
protected | property | The views plugin this configuration will affect when exposed. | |
BetterExposedFiltersWidgetBase:: |
protected | property | The views executable object. | |
BetterExposedFiltersWidgetBase:: |
protected | function | Sets metadata on the form elements for easier processing. | |
BetterExposedFiltersWidgetBase:: |
protected | function | Moves an exposed form element into a field group. | |
BetterExposedFiltersWidgetBase:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
BetterExposedFiltersWidgetBase:: |
protected | function | Returns exposed form action URL object. | |
BetterExposedFiltersWidgetBase:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
|
BetterExposedFiltersWidgetBase:: |
public | function |
Sets the view object. Overrides BetterExposedFiltersWidgetInterface:: |
|
BetterExposedFiltersWidgetBase:: |
public | function |
Sets the exposed view handler plugin. Overrides BetterExposedFiltersWidgetInterface:: |
|
BetterExposedFiltersWidgetBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
|
BetterExposedFiltersWidgetBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
1 |
BetterExposedFiltersWidgetBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
Links:: |
public | function |
Manipulate views exposed from element. Overrides SortWidgetBase:: |
|
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. | |
SortWidgetBase:: |
protected | property | List of available exposed sort form element keys. | |
SortWidgetBase:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
|
SortWidgetBase:: |
public | function |
Gets default configuration for this plugin. Overrides BetterExposedFiltersWidgetBase:: |
|
SortWidgetBase:: |
public static | function |
Verify this plugin can be used on the form element. Overrides BetterExposedFiltersWidgetInterface:: |
|
SortWidgetBase:: |
public | function | Unpacks sort_by and sort_order from the sort_bef_combine element. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |