class TaxonomyIndexTid
Same name in this branch
- 10 core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\field\TaxonomyIndexTid
Same name in other branches
- 9 core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\field\TaxonomyIndexTid
- 9 core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid
- 8.9.x core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\field\TaxonomyIndexTid
- 8.9.x core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid
- 11.x core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\field\TaxonomyIndexTid
- 11.x core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid
Filter by term id.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\PluginBase implements \Drupal\views\Plugin\views\ViewsHandlerInterface
- class \Drupal\views\Plugin\views\filter\FilterPluginBase extends \Drupal\views\Plugin\views\HandlerBase implements \Drupal\Core\Cache\CacheableDependencyInterface
- class \Drupal\views\Plugin\views\filter\InOperator extends \Drupal\views\Plugin\views\filter\FilterPluginBase implements \Drupal\views\Plugin\views\filter\FilterOperatorsInterface
- class \Drupal\views\Plugin\views\filter\ManyToOne extends \Drupal\views\Plugin\views\filter\InOperator
- class \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid extends \Drupal\views\Plugin\views\filter\ManyToOne
- class \Drupal\views\Plugin\views\filter\ManyToOne extends \Drupal\views\Plugin\views\filter\InOperator
- class \Drupal\views\Plugin\views\filter\InOperator extends \Drupal\views\Plugin\views\filter\FilterPluginBase implements \Drupal\views\Plugin\views\filter\FilterOperatorsInterface
- class \Drupal\views\Plugin\views\filter\FilterPluginBase extends \Drupal\views\Plugin\views\HandlerBase implements \Drupal\Core\Cache\CacheableDependencyInterface
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\PluginBase implements \Drupal\views\Plugin\views\ViewsHandlerInterface
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of TaxonomyIndexTid
Related topics
File
-
core/
modules/ taxonomy/ src/ Plugin/ views/ filter/ TaxonomyIndexTid.php, line 22
Namespace
Drupal\taxonomy\Plugin\views\filterView source
class TaxonomyIndexTid extends ManyToOne {
/**
* Stores the exposed input for this filter.
*
* @var array|null
*/
// phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
public $validated_exposed_input = NULL;
/**
* The vocabulary storage.
*
* @var \Drupal\taxonomy\VocabularyStorageInterface
*/
protected $vocabularyStorage;
/**
* The term storage.
*
* @var \Drupal\taxonomy\TermStorageInterface
*/
protected $termStorage;
/**
* The current user.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected $currentUser;
/**
* Constructs a TaxonomyIndexTid object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin ID for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage
* The vocabulary storage.
* @param \Drupal\taxonomy\TermStorageInterface $term_storage
* The term storage.
* @param \Drupal\Core\Session\AccountInterface $current_user
* The current user.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage, TermStorageInterface $term_storage, AccountInterface $current_user) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->vocabularyStorage = $vocabulary_storage;
$this->termStorage = $term_storage;
$this->currentUser = $current_user;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity_type.manager')
->getStorage('taxonomy_vocabulary'), $container->get('entity_type.manager')
->getStorage('taxonomy_term'), $container->get('current_user'));
}
/**
* {@inheritdoc}
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
parent::init($view, $display, $options);
if (!empty($this->definition['vocabulary'])) {
$this->options['vid'] = $this->definition['vocabulary'];
}
}
public function hasExtraOptions() {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function getValueOptions() {
return $this->valueOptions;
}
protected function defineOptions() {
$options = parent::defineOptions();
$options['type'] = [
'default' => 'textfield',
];
$options['limit'] = [
'default' => TRUE,
];
$options['vid'] = [
'default' => '',
];
$options['hierarchy'] = [
'default' => FALSE,
];
$options['error_message'] = [
'default' => TRUE,
];
return $options;
}
public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) {
$vocabularies = $this->vocabularyStorage
->loadMultiple();
$options = [];
foreach ($vocabularies as $voc) {
$options[$voc->id()] = $voc->label();
}
if ($this->options['limit']) {
// We only do this when the form is displayed.
if (empty($this->options['vid'])) {
$first_vocabulary = reset($vocabularies);
$this->options['vid'] = $first_vocabulary->id();
}
if (empty($this->definition['vocabulary'])) {
$form['vid'] = [
'#type' => 'radios',
'#title' => $this->t('Vocabulary'),
'#options' => $options,
'#description' => $this->t('Select which vocabulary to show terms for in the regular options.'),
'#default_value' => $this->options['vid'],
];
}
}
$form['type'] = [
'#type' => 'radios',
'#title' => $this->t('Selection type'),
'#options' => [
'select' => $this->t('Dropdown'),
'textfield' => $this->t('Autocomplete'),
],
'#default_value' => $this->options['type'],
];
$form['hierarchy'] = [
'#type' => 'checkbox',
'#title' => $this->t('Show hierarchy in dropdown'),
'#default_value' => !empty($this->options['hierarchy']),
'#states' => [
'visible' => [
':input[name="options[type]"]' => [
'value' => 'select',
],
],
],
];
}
protected function valueForm(&$form, FormStateInterface $form_state) {
$vocabulary = $this->vocabularyStorage
->load($this->options['vid']);
if (empty($vocabulary) && $this->options['limit']) {
$form['markup'] = [
'#markup' => '<div class="js-form-item form-item">' . $this->t('An invalid vocabulary is selected. Change it in the options.') . '</div>',
];
return;
}
if ($this->options['type'] == 'textfield') {
$terms = $this->value ? Term::loadMultiple($this->value) : [];
$form['value'] = [
'#title' => $this->options['limit'] ? $this->t('Select terms from vocabulary @voc', [
'@voc' => $vocabulary->label(),
]) : $this->t('Select terms'),
'#type' => 'textfield',
'#default_value' => EntityAutocomplete::getEntityLabels($terms),
];
if ($this->options['limit']) {
$form['value']['#type'] = 'entity_autocomplete';
$form['value']['#target_type'] = 'taxonomy_term';
$form['value']['#selection_settings']['target_bundles'] = [
$vocabulary->id(),
];
$form['value']['#tags'] = TRUE;
$form['value']['#process_default_value'] = FALSE;
}
}
else {
if (!empty($this->options['hierarchy']) && $this->options['limit']) {
$tree = $this->termStorage
->loadTree($vocabulary->id(), 0, NULL, TRUE);
$options = [];
if ($tree) {
foreach ($tree as $term) {
if (!$term->isPublished() && !$this->currentUser
->hasPermission('administer taxonomy')) {
continue;
}
$choice = new \stdClass();
$choice->option = [
$term->id() => str_repeat('-', $term->depth) . \Drupal::service('entity.repository')->getTranslationFromContext($term)
->label(),
];
$options[] = $choice;
}
}
}
else {
$options = [];
$query = \Drupal::entityQuery('taxonomy_term')->accessCheck(TRUE)
->sort('weight')
->sort('name')
->addTag('taxonomy_term_access');
if (!$this->currentUser
->hasPermission('administer taxonomy')) {
$query->condition('status', 1);
}
if ($this->options['limit']) {
$query->condition('vid', $vocabulary->id());
}
$terms = Term::loadMultiple($query->execute());
foreach ($terms as $term) {
$options[$term->id()] = \Drupal::service('entity.repository')->getTranslationFromContext($term)
->label();
}
}
$default_value = (array) $this->value;
if ($exposed = $form_state->get('exposed')) {
$identifier = $this->options['expose']['identifier'];
if (!empty($this->options['expose']['reduce'])) {
$options = $this->reduceValueOptions($options);
if (!empty($this->options['expose']['multiple']) && empty($this->options['expose']['required'])) {
$default_value = [];
}
}
if (empty($this->options['expose']['multiple'])) {
if (empty($this->options['expose']['required']) && (empty($default_value) || !empty($this->options['expose']['reduce']))) {
$default_value = 'All';
}
elseif (empty($default_value)) {
$keys = array_keys($options);
$default_value = array_shift($keys);
}
elseif ($default_value == [
'',
]) {
$default_value = 'All';
}
else {
$copy = $default_value;
$default_value = array_shift($copy);
}
}
}
$form['value'] = [
'#type' => 'select',
'#title' => $this->options['limit'] ? $this->t('Select terms from vocabulary @voc', [
'@voc' => $vocabulary->label(),
]) : $this->t('Select terms'),
'#multiple' => TRUE,
'#options' => $options,
'#size' => min(9, count($options)),
'#default_value' => $default_value,
];
$user_input = $form_state->getUserInput();
if ($exposed && isset($identifier) && !isset($user_input[$identifier])) {
$user_input[$identifier] = $default_value;
$form_state->setUserInput($user_input);
}
}
if (!$form_state->get('exposed')) {
// Retain the helper option
$this->helper
->buildOptionsForm($form, $form_state);
// Show help text if not exposed to end users.
$form['value']['#description'] = $this->t('Leave blank for all. Otherwise, the first selected term will be the default instead of "Any".');
}
}
protected function valueValidate($form, FormStateInterface $form_state) {
// We only validate if they've chosen the text field style.
if ($this->options['type'] != 'textfield') {
return;
}
$tids = [];
if ($values = $form_state->getValue([
'options',
'value',
])) {
foreach ($values as $value) {
$tids[] = $value['target_id'];
}
}
$form_state->setValue([
'options',
'value',
], $tids);
}
public function acceptExposedInput($input) {
if (empty($this->options['exposed'])) {
return TRUE;
}
// We need to know the operator, which is normally set in
// \Drupal\views\Plugin\views\filter\FilterPluginBase::acceptExposedInput(),
// before we actually call the parent version of ourselves.
if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id']) && isset($input[$this->options['expose']['operator_id']])) {
$this->operator = $input[$this->options['expose']['operator_id']];
}
// If view is an attachment and is inheriting exposed filters, then assume
// exposed input has already been validated
if (!empty($this->view->is_attachment) && $this->view->display_handler
->usesExposed()) {
$this->validated_exposed_input = (array) $this->view->exposed_raw_input[$this->options['expose']['identifier']];
}
// If we're checking for EMPTY or NOT, we don't need any input, and we can
// say that our input conditions are met by just having the right operator.
if ($this->operator == 'empty' || $this->operator == 'not empty') {
return TRUE;
}
// If it's non-required and there's no value don't bother filtering.
if (!$this->options['expose']['required'] && empty($this->validated_exposed_input)) {
return FALSE;
}
$rc = parent::acceptExposedInput($input);
if ($rc) {
// If we have previously validated input, override.
if (isset($this->validated_exposed_input)) {
$this->value = $this->validated_exposed_input;
}
}
return $rc;
}
public function validateExposed(&$form, FormStateInterface $form_state) {
if (empty($this->options['exposed'])) {
return;
}
$identifier = $this->options['expose']['identifier'];
$input = $form_state->getValue($identifier);
if ($this->options['is_grouped'] && isset($this->options['group_info']['group_items'][$input])) {
$this->validated_exposed_input = $this->options['group_info']['group_items'][$input]['value'];
return;
}
// We only validate if they've chosen the text field style.
if ($this->options['type'] != 'textfield') {
if ($form_state->getValue($identifier) != 'All') {
$this->validated_exposed_input = (array) $form_state->getValue($identifier);
}
return;
}
if (empty($this->options['expose']['identifier'])) {
return;
}
if ($values = $form_state->getValue($identifier)) {
foreach ($values as $value) {
$this->validated_exposed_input[] = $value['target_id'];
}
}
}
protected function valueSubmit($form, FormStateInterface $form_state) {
// Prevent array_filter from messing up our arrays in parent submit.
}
public function buildExposeForm(&$form, FormStateInterface $form_state) {
parent::buildExposeForm($form, $form_state);
if ($this->options['type'] != 'select') {
unset($form['expose']['reduce']);
}
$form['error_message'] = [
'#type' => 'checkbox',
'#title' => $this->t('Display error message'),
'#default_value' => !empty($this->options['error_message']),
];
}
public function adminSummary() {
// Set up $this->valueOptions for the parent summary
$this->valueOptions = [];
if ($this->value) {
$this->value = array_filter($this->value);
$terms = Term::loadMultiple($this->value);
foreach ($terms as $term) {
$this->valueOptions[$term->id()] = \Drupal::service('entity.repository')->getTranslationFromContext($term)
->label();
}
}
return parent::adminSummary();
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
$vocabulary = $this->vocabularyStorage
->load($this->options['vid']);
$dependencies[$vocabulary->getConfigDependencyKey()][] = $vocabulary->getConfigDependencyName();
foreach ($this->termStorage
->loadMultiple($this->options['value']) as $term) {
$dependencies[$term->getConfigDependencyKey()][] = $term->getConfigDependencyName();
}
return $dependencies;
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|---|
DerivativeInspectionInterface::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | 1 | ||
DerivativeInspectionInterface::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | 1 | ||
FilterPluginBase::$alwaysMultiple | protected | property | Disable the possibility to force a single value. | 6 | ||
FilterPluginBase::$always_required | public | property | ||||
FilterPluginBase::$group_info | public | property | ||||
FilterPluginBase::$no_operator | public | property | 1 | |||
FilterPluginBase::$operator | public | property | Contains the operator which is used on the query. | |||
FilterPluginBase::$tableAliases | public | property | Keyed array by alias of table relations. | |||
FilterPluginBase::$value | public | property | The value. | |||
FilterPluginBase::addGroupForm | public | function | Add a new group to the exposed filter groups. | |||
FilterPluginBase::arrayFilterZero | protected static | function | Filter by no empty values, though allow the use of (string) "0". | |||
FilterPluginBase::buildExposedFiltersGroupForm | protected | function | Build the form to let users create the group of exposed filters. | |||
FilterPluginBase::buildExposedForm | public | function | Render our chunk of the exposed filter form when selecting. | Overrides HandlerBase::buildExposedForm | ||
FilterPluginBase::buildGroupForm | public | function | Displays the Build Group form. | |||
FilterPluginBase::buildGroupOptions | protected | function | Provide default options for exposed filters. | |||
FilterPluginBase::buildGroupSubmit | protected | function | Save new group items, re-enumerates and remove groups marked to delete. | |||
FilterPluginBase::buildGroupValidate | protected | function | Validate the build group options form. | |||
FilterPluginBase::buildOptionsForm | public | function | Provide the basic form which calls through to subforms. | Overrides HandlerBase::buildOptionsForm | 2 | |
FilterPluginBase::buildValueWrapper | protected | function | Builds wrapper for value and operator forms. | |||
FilterPluginBase::canBuildGroup | protected | function | Determine if a filter can be converted into a group. | |||
FilterPluginBase::canExpose | public | function | Determine if a filter can be exposed. | Overrides HandlerBase::canExpose | 5 | |
FilterPluginBase::canGroup | public | function | Can this filter be used in OR groups? | 1 | ||
FilterPluginBase::convertExposedInput | public | function | Transform the input from a grouped filter into a standard filter. | |||
FilterPluginBase::exposedInfo | public | function | Tell the renderer about our exposed form. | Overrides HandlerBase::exposedInfo | ||
FilterPluginBase::exposedTranslate | protected | function | Make some translations to a form item to make it more suitable to exposing. | |||
FilterPluginBase::getCacheContexts | public | function | The cache contexts associated with this object. | Overrides CacheableDependencyInterface::getCacheContexts | 6 | |
FilterPluginBase::getCacheMaxAge | public | function | The maximum age for which this object may be cached. | Overrides CacheableDependencyInterface::getCacheMaxAge | ||
FilterPluginBase::getCacheTags | public | function | The cache tags associated with this object. | Overrides CacheableDependencyInterface::getCacheTags | 1 | |
FilterPluginBase::groupForm | public | function | Builds a group form. | |||
FilterPluginBase::groupMultipleExposedInput | public | function | Group multiple exposed input. | |||
FilterPluginBase::hasValidGroupedValue | protected | function | Determines if the given grouped filter entry has a valid value. | 1 | ||
FilterPluginBase::isAGroup | public | function | Returns TRUE if the exposed filter works like a grouped filter. | Overrides HandlerBase::isAGroup | ||
FilterPluginBase::multipleExposedInput | public | function | Multiple exposed input. | Overrides HandlerBase::multipleExposedInput | ||
FilterPluginBase::operatorForm | protected | function | Options form subform for setting the operator. | 6 | ||
FilterPluginBase::operatorSubmit | public | function | Perform any necessary changes to the form values prior to storage. | |||
FilterPluginBase::operatorValidate | protected | function | Validate the operator form. | |||
FilterPluginBase::prepareFilterSelectOptions | protected | function | Sanitizes the HTML select element's options. | |||
FilterPluginBase::RESTRICTED_IDENTIFIERS | constant | A list of restricted identifiers. | ||||
FilterPluginBase::showBuildGroupButton | protected | function | Shortcut to display the build_group/hide button. | |||
FilterPluginBase::showBuildGroupForm | public | function | Shortcut to display the exposed options form. | |||
FilterPluginBase::showExposeButton | public | function | Shortcut to display the expose/hide button. | Overrides HandlerBase::showExposeButton | ||
FilterPluginBase::showOperatorForm | public | function | Shortcut to display the operator form. | |||
FilterPluginBase::showValueForm | protected | function | Shortcut to display the value form. | |||
FilterPluginBase::storeExposedInput | public | function | If set to remember exposed input in the session, store it there. | Overrides HandlerBase::storeExposedInput | ||
FilterPluginBase::storeGroupInput | public | function | If set to remember exposed input in the session, store it there. | |||
FilterPluginBase::submitOptionsForm | public | function | Simple submit handler. | Overrides PluginBase::submitOptionsForm | ||
FilterPluginBase::trustedCallbacks | public static | function | Lists the trusted callbacks provided by the implementing class. | Overrides PluginBase::trustedCallbacks | ||
FilterPluginBase::validateExposeForm | public | function | Validate the options form. | Overrides HandlerBase::validateExposeForm | ||
FilterPluginBase::validateIdentifier | protected | function | Validates a filter identifier. | |||
FilterPluginBase::validateOptionsForm | public | function | Simple validate handler. | Overrides PluginBase::validateOptionsForm | 1 | |
HandlerBase::$field | public | property | With field you can override the realField if the real field is not set. | |||
HandlerBase::$is_handler | public | property | ||||
HandlerBase::$moduleHandler | protected | property | The module handler. | 2 | ||
HandlerBase::$query | public | property | Where the $query object will reside. | 7 | ||
HandlerBase::$realField | public | property | The real field. | |||
HandlerBase::$relationship | public | property | The relationship used for this field. | |||
HandlerBase::$table | public | property | The table this handler is attached to. | |||
HandlerBase::$tableAlias | public | property | The alias of the table of this handler which is used in the query. | |||
HandlerBase::$viewsData | protected | property | The views data service. | |||
HandlerBase::access | public | function | Check whether given user has access to this handler. | Overrides ViewsHandlerInterface::access | 5 | |
HandlerBase::adminLabel | public | function | Return a string representing this handler's name in the UI. | Overrides ViewsHandlerInterface::adminLabel | 4 | |
HandlerBase::breakString | public static | function | Breaks x,y,z and x+y+z into an array. | Overrides ViewsHandlerInterface::breakString | ||
HandlerBase::broken | public | function | Determines if the handler is considered 'broken'. | Overrides ViewsHandlerInterface::broken | ||
HandlerBase::buildGroupByForm | public | function | Provide a form for aggregation settings. | 1 | ||
HandlerBase::caseTransform | protected | function | Transform a string by a certain method. | |||
HandlerBase::defineExtraOptions | public | function | Provide defaults for the handler. | |||
HandlerBase::displayExposedForm | public | function | Displays the Expose form. | |||
HandlerBase::getDateField | public | function | Creates cross-database SQL dates. | 2 | ||
HandlerBase::getDateFormat | public | function | Creates cross-database SQL date formatting. | 2 | ||
HandlerBase::getEntityType | public | function | Determines the entity type used by this handler. | Overrides ViewsHandlerInterface::getEntityType | ||
HandlerBase::getField | public | function | Shortcut to get a handler's raw field value. | Overrides ViewsHandlerInterface::getField | ||
HandlerBase::getJoin | public | function | Get the join object that should be used for this handler. | Overrides ViewsHandlerInterface::getJoin | ||
HandlerBase::getModuleHandler | protected | function | Gets the module handler. | |||
HandlerBase::getTableJoin | public static | function | Fetches a handler to join one table to a primary table from the data cache. | Overrides ViewsHandlerInterface::getTableJoin | ||
HandlerBase::getViewsData | protected | function | Gets views data service. | |||
HandlerBase::isExposed | public | function | Determine if this item is 'exposed'. | |||
HandlerBase::placeholder | protected | function | Provides a unique placeholders for handlers. | |||
HandlerBase::postExecute | public | function | Run after the view is executed, before the result is cached. | Overrides ViewsHandlerInterface::postExecute | ||
HandlerBase::preQuery | public | function | Run before the view is built. | Overrides ViewsHandlerInterface::preQuery | 2 | |
HandlerBase::sanitizeValue | public | function | Sanitize the value for output. | Overrides ViewsHandlerInterface::sanitizeValue | ||
HandlerBase::setModuleHandler | public | function | Sets the module handler. | |||
HandlerBase::setRelationship | public | function | Sets up any needed relationship. | Overrides ViewsHandlerInterface::setRelationship | ||
HandlerBase::setViewsData | public | function | ||||
HandlerBase::showExposeForm | public | function | Shortcut to display the exposed options form. | Overrides ViewsHandlerInterface::showExposeForm | ||
HandlerBase::submitExposed | public | function | Submit the exposed handler form. | |||
HandlerBase::submitExposeForm | public | function | Perform any necessary changes to the form exposes prior to storage. | |||
HandlerBase::submitExtraOptionsForm | public | function | Perform any necessary changes to the form values prior to storage. | |||
HandlerBase::submitFormCalculateOptions | public | function | Calculates options stored on the handler. | 1 | ||
HandlerBase::submitGroupByForm | public | function | Perform any necessary changes to the form values prior to storage. | 1 | ||
HandlerBase::submitTemporaryForm | public | function | Submits a temporary form. | |||
HandlerBase::usesGroupBy | public | function | Provides the handler some groupby. | 13 | ||
HandlerBase::validateExtraOptionsForm | public | function | Validate the options form. | |||
InOperator::$valueOptions | protected | property | Stores all operations which are available on the form. | |||
InOperator::$valueTitle | protected | property | The filter title. | |||
InOperator::defaultExposeOptions | public | function | Provide default options for exposed filters. | Overrides FilterPluginBase::defaultExposeOptions | ||
InOperator::opEmpty | protected | function | ||||
InOperator::operatorOptions | public | function | Build strings from the operators() for 'select' options. | Overrides FilterPluginBase::operatorOptions | 1 | |
InOperator::operatorValues | protected | function | ||||
InOperator::opSimple | protected | function | 1 | |||
InOperator::query | public | function | Add this filter to the query. | Overrides FilterPluginBase::query | 6 | |
InOperator::reduceValueOptions | public | function | When using exposed filters, we may be required to reduce the set. | |||
InOperator::validate | public | function | Validate that the plugin is correct and can be saved. | Overrides FilterPluginBase::validate | ||
ManyToOne::$helper | public | property | Stores the Helper object which handles the many_to_one complexity. | |||
ManyToOne::$valueFormType | protected | property | Overrides InOperator::$valueFormType | |||
ManyToOne::ensureMyTable | public | function | Ensures that the main table for this handler is in the query. | Overrides HandlerBase::ensureMyTable | ||
ManyToOne::operators | public | function | Returns an array of operator information, keyed by operator ID. | Overrides InOperator::operators | 1 | |
ManyToOne::opHelper | protected | function | ||||
PluginBase::$definition | public | property | Plugins' definition. | |||
PluginBase::$displayHandler | public | property | The display object this plugin is for. | |||
PluginBase::$options | public | property | Options for this plugin will be held here. | |||
PluginBase::$position | public | property | The handler position. | |||
PluginBase::$renderer | protected | property | Stores the render API renderer. | 3 | ||
PluginBase::$usesOptions | protected | property | Denotes whether the plugin has an additional options form. | 8 | ||
PluginBase::$view | public | property | The top object of a view. | 1 | ||
PluginBase::destroy | public | function | Clears a plugin. | Overrides ViewsPluginInterface::destroy | 2 | |
PluginBase::doFilterByDefinedOptions | protected | function | Do the work to filter out stored options depending on the defined options. | |||
PluginBase::filterByDefinedOptions | public | function | Filter out stored options depending on the defined options. | Overrides ViewsPluginInterface::filterByDefinedOptions | ||
PluginBase::getAvailableGlobalTokens | public | function | Returns an array of available token replacements. | Overrides ViewsPluginInterface::getAvailableGlobalTokens | ||
PluginBase::getProvider | public | function | Returns the plugin provider. | Overrides ViewsPluginInterface::getProvider | ||
PluginBase::getRenderer | protected | function | Returns the render API renderer. | 1 | ||
PluginBase::globalTokenForm | public | function | Adds elements for available core tokens to a form. | Overrides ViewsPluginInterface::globalTokenForm | ||
PluginBase::globalTokenReplace | public | function | Returns a string with any core tokens replaced. | Overrides ViewsPluginInterface::globalTokenReplace | ||
PluginBase::INCLUDE_ENTITY | constant | Include entity row languages when listing languages. | ||||
PluginBase::INCLUDE_NEGOTIATED | constant | Include negotiated languages when listing languages. | ||||
PluginBase::listLanguages | protected | function | Makes an array of languages, optionally including special languages. | |||
PluginBase::pluginTitle | public | function | Return the human readable name of the display. | Overrides ViewsPluginInterface::pluginTitle | ||
PluginBase::preRenderAddFieldsetMarkup | public static | function | Moves form elements into fieldsets for presentation purposes. | Overrides ViewsPluginInterface::preRenderAddFieldsetMarkup | ||
PluginBase::preRenderFlattenData | public static | function | Flattens the structure of form elements. | Overrides ViewsPluginInterface::preRenderFlattenData | ||
PluginBase::queryLanguageSubstitutions | public static | function | Returns substitutions for Views queries for languages. | |||
PluginBase::setOptionDefaults | protected | function | Fills up the options of the plugin with defaults. | |||
PluginBase::summaryTitle | public | function | Returns the summary of the settings in the display. | Overrides ViewsPluginInterface::summaryTitle | 6 | |
PluginBase::themeFunctions | public | function | Provide a full list of possible theme templates used by this style. | Overrides ViewsPluginInterface::themeFunctions | 1 | |
PluginBase::unpackOptions | public | function | Unpacks options over our existing defaults. | Overrides ViewsPluginInterface::unpackOptions | ||
PluginBase::usesOptions | public | function | Returns the usesOptions property. | Overrides ViewsPluginInterface::usesOptions | 8 | |
PluginBase::viewsTokenReplace | protected | function | Replaces Views' tokens in a given string. | 1 | ||
PluginBase::VIEWS_QUERY_LANGUAGE_SITE_DEFAULT | constant | Query string to indicate the site default language. | ||||
PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | 6 | ||
PluginInspectionInterface::getPluginId | public | function | Gets the plugin ID of the plugin instance. | 2 | ||
TaxonomyIndexTid::$currentUser | protected | property | The current user. | |||
TaxonomyIndexTid::$termStorage | protected | property | The term storage. | |||
TaxonomyIndexTid::$validated_exposed_input | public | property | ||||
TaxonomyIndexTid::$vocabularyStorage | protected | property | The vocabulary storage. | |||
TaxonomyIndexTid::acceptExposedInput | public | function | Determines if the input from a filter should change the generated query. | Overrides InOperator::acceptExposedInput | ||
TaxonomyIndexTid::adminSummary | public | function | Display the filter on the administrative summary. | Overrides InOperator::adminSummary | ||
TaxonomyIndexTid::buildExposeForm | public | function | Options form subform for exposed filter options. | Overrides InOperator::buildExposeForm | ||
TaxonomyIndexTid::buildExtraOptionsForm | public | function | Provide a form for setting options. | Overrides HandlerBase::buildExtraOptionsForm | 1 | |
TaxonomyIndexTid::calculateDependencies | public | function | Calculates dependencies for the configured plugin. | Overrides HandlerBase::calculateDependencies | ||
TaxonomyIndexTid::create | public static | function | Creates an instance of the plugin. | Overrides PluginBase::create | ||
TaxonomyIndexTid::defineOptions | protected | function | Information about options for all kinds of purposes will be held here. | Overrides ManyToOne::defineOptions | 1 | |
TaxonomyIndexTid::getValueOptions | public | function | Gets the value options. | Overrides InOperator::getValueOptions | ||
TaxonomyIndexTid::hasExtraOptions | public | function | Determines if the handler has extra options. | Overrides HandlerBase::hasExtraOptions | ||
TaxonomyIndexTid::init | public | function | Overrides \Drupal\views\Plugin\views\HandlerBase::init(). | Overrides ManyToOne::init | ||
TaxonomyIndexTid::validateExposed | public | function | Validate the exposed handler form. | Overrides HandlerBase::validateExposed | ||
TaxonomyIndexTid::valueForm | protected | function | Options form subform for setting options. | Overrides ManyToOne::valueForm | ||
TaxonomyIndexTid::valueSubmit | protected | function | Perform any necessary changes to the form values prior to storage. | Overrides InOperator::valueSubmit | ||
TaxonomyIndexTid::valueValidate | protected | function | Validate the options form. | Overrides FilterPluginBase::valueValidate | ||
TaxonomyIndexTid::__construct | public | function | Constructs a TaxonomyIndexTid object. | Overrides HandlerBase::__construct | ||
TrustedCallbackInterface::THROW_EXCEPTION | constant | Untrusted callbacks throw exceptions. | ||||
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION | constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||||
TrustedCallbackInterface::TRIGGER_WARNING | Deprecated | constant | Untrusted callbacks trigger E_USER_WARNING errors. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.