summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/views/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/views/src')
-rw-r--r--core/modules/views/src/EventSubscriber/RouteSubscriber.php2
-rw-r--r--core/modules/views/src/Form/ViewsExposedForm.php2
-rw-r--r--core/modules/views/src/Hook/ViewsHooks.php4
-rw-r--r--core/modules/views/src/ManyToOneHelper.php4
-rw-r--r--core/modules/views/src/Plugin/views/HandlerBase.php6
-rw-r--r--core/modules/views/src/Plugin/views/area/View.php4
-rw-r--r--core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php6
-rw-r--r--core/modules/views/src/Plugin/views/argument/DayDate.php2
-rw-r--r--core/modules/views/src/Plugin/views/display/DisplayPluginBase.php2
-rw-r--r--core/modules/views/src/Plugin/views/display/PathPluginBase.php2
-rw-r--r--core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php2
-rw-r--r--core/modules/views/src/Plugin/views/field/Custom.php2
-rw-r--r--core/modules/views/src/Plugin/views/field/EntityField.php2
-rw-r--r--core/modules/views/src/Plugin/views/field/FieldPluginBase.php8
-rw-r--r--core/modules/views/src/Plugin/views/filter/Combine.php2
-rw-r--r--core/modules/views/src/Plugin/views/filter/StringFilter.php2
-rw-r--r--core/modules/views/src/Plugin/views/join/JoinPluginBase.php2
-rw-r--r--core/modules/views/src/Plugin/views/query/QueryPluginBase.php2
-rw-r--r--core/modules/views/src/Plugin/views/query/Sql.php10
-rw-r--r--core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php2
-rw-r--r--core/modules/views/src/Plugin/views/sort/SortPluginBase.php2
-rw-r--r--core/modules/views/src/Plugin/views/style/StylePluginBase.php4
-rw-r--r--core/modules/views/src/Plugin/views/style/Table.php8
-rw-r--r--core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php12
-rw-r--r--core/modules/views/src/ViewExecutable.php14
-rw-r--r--core/modules/views/src/Views.php4
-rw-r--r--core/modules/views/src/ViewsDataHelper.php8
27 files changed, 60 insertions, 60 deletions
diff --git a/core/modules/views/src/EventSubscriber/RouteSubscriber.php b/core/modules/views/src/EventSubscriber/RouteSubscriber.php
index 6e6ca6e6544..23e4640de98 100644
--- a/core/modules/views/src/EventSubscriber/RouteSubscriber.php
+++ b/core/modules/views/src/EventSubscriber/RouteSubscriber.php
@@ -76,7 +76,7 @@ class RouteSubscriber extends RouteSubscriberBase {
public static function getSubscribedEvents(): array {
$events = parent::getSubscribedEvents();
$events[RoutingEvents::FINISHED] = ['routeRebuildFinished'];
- // Ensure to run after the entity resolver subscriber
+ // Ensure to run after the entity resolver subscriber.
// @see \Drupal\Core\EventSubscriber\EntityRouteAlterSubscriber
$events[RoutingEvents::ALTER] = ['onAlterRoutes', -175];
diff --git a/core/modules/views/src/Form/ViewsExposedForm.php b/core/modules/views/src/Form/ViewsExposedForm.php
index 9f90160ff55..e623618c5ae 100644
--- a/core/modules/views/src/Form/ViewsExposedForm.php
+++ b/core/modules/views/src/Form/ViewsExposedForm.php
@@ -79,7 +79,7 @@ class ViewsExposedForm extends FormBase implements WorkspaceSafeFormInterface {
// Let form plugins know this is for exposed widgets.
$form_state->set('exposed', TRUE);
- // Check if the form was already created
+ // Check if the form was already created.
if ($cache = $this->exposedFormCache->getForm($view->storage->id(), $view->current_display)) {
return $cache;
}
diff --git a/core/modules/views/src/Hook/ViewsHooks.php b/core/modules/views/src/Hook/ViewsHooks.php
index 5a7b28735f5..136714de6c9 100644
--- a/core/modules/views/src/Hook/ViewsHooks.php
+++ b/core/modules/views/src/Hook/ViewsHooks.php
@@ -96,7 +96,7 @@ class ViewsHooks {
\Drupal::moduleHandler()->loadInclude('views', 'inc', 'views.theme');
// Some quasi clever array merging here.
$base = ['file' => 'views.theme.inc'];
- // Our extra version of pager
+ // Our extra version of pager.
$hooks['views_mini_pager'] = $base + [
'variables' => [
'tags' => [],
@@ -151,7 +151,7 @@ class ViewsHooks {
'parameters' => [],
],
];
- // Default view themes
+ // Default view themes.
$hooks['views_view_field'] = $base + ['variables' => ['view' => NULL, 'field' => NULL, 'row' => NULL]];
$hooks['views_view_grouping'] = $base + [
'variables' => [
diff --git a/core/modules/views/src/ManyToOneHelper.php b/core/modules/views/src/ManyToOneHelper.php
index 56afc646c4b..62b3ead7021 100644
--- a/core/modules/views/src/ManyToOneHelper.php
+++ b/core/modules/views/src/ManyToOneHelper.php
@@ -92,7 +92,7 @@ class ManyToOneHelper {
// need to create a new relationship to use.
$relationship = $this->handler->relationship;
- // Determine the primary table to seek
+ // Determine the primary table to seek.
if (empty($this->handler->query->relationships[$relationship])) {
$base_table = $this->handler->view->storage->get('base_table');
}
@@ -140,7 +140,7 @@ class ManyToOneHelper {
$field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field;
$join = $this->getJoin();
- // Shortcuts
+ // Shortcuts.
$options = $this->handler->options;
$view = $this->handler->view;
$query = $this->handler->query;
diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php
index b3503f44218..7c74d7244c5 100644
--- a/core/modules/views/src/Plugin/views/HandlerBase.php
+++ b/core/modules/views/src/Plugin/views/HandlerBase.php
@@ -703,7 +703,7 @@ abstract class HandlerBase extends PluginBase implements ViewsHandlerInterface {
*/
public function getJoin() {
// Get the join from this table that links back to the base table.
- // Determine the primary table to seek
+ // Determine the primary table to seek.
if (empty($this->query->relationships[$this->relationship])) {
$base_table = $this->view->storage->get('base_table');
}
@@ -878,7 +878,7 @@ abstract class HandlerBase extends PluginBase implements ViewsHandlerInterface {
*/
public function displayExposedForm($form, FormStateInterface $form_state) {
$item = &$this->options;
- // Flip
+ // Flip.
$item['exposed'] = empty($item['exposed']);
// If necessary, set new defaults:
@@ -958,7 +958,7 @@ abstract class HandlerBase extends PluginBase implements ViewsHandlerInterface {
$form_state->get('rerender', TRUE);
$form_state->setRebuild();
- // Write to cache
+ // Write to cache.
$view->cacheSet();
}
diff --git a/core/modules/views/src/Plugin/views/area/View.php b/core/modules/views/src/Plugin/views/area/View.php
index b15e72c0864..d1949d79a8d 100644
--- a/core/modules/views/src/Plugin/views/area/View.php
+++ b/core/modules/views/src/Plugin/views/area/View.php
@@ -111,11 +111,11 @@ class View extends AreaPluginBase {
}
$view->setDisplay($display_id);
- // Avoid recursion
+ // Avoid recursion.
$view->parent_views += $this->view->parent_views;
$view->parent_views[] = "$view_name:$display_id";
- // Check if the view is part of the parent views of this view
+ // Check if the view is part of the parent views of this view.
$search = "$view_name:$display_id";
if (in_array($search, $this->view->parent_views)) {
\Drupal::messenger()->addError($this->t("Recursion detected in view @view display @display.", ['@view' => $view_name, '@display' => $display_id]));
diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
index 1caeead7b39..7746046b6bf 100644
--- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
@@ -511,7 +511,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
$plugin->validateOptionsForm($form['argument_default'][$default_id], $form_state, $option_values['argument_default'][$default_id]);
}
- // Summary plugin
+ // Summary plugin.
$summary_id = $option_values['summary']['format'];
$plugin = $this->getPlugin('style', $summary_id);
if ($plugin) {
@@ -548,7 +548,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
$option_values['default_argument_options'] = $options;
}
- // Summary plugin
+ // Summary plugin.
$summary_id = $option_values['summary']['format'];
$plugin = $this->getPlugin('style', $summary_id);
if ($plugin) {
@@ -1000,7 +1000,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
* code that goes into summaryQuery()
*/
public function summaryBasics($count_field = TRUE) {
- // Add the number of nodes counter
+ // Add the number of nodes counter.
$distinct = ($this->view->display_handler->getOption('distinct') && empty($this->query->no_distinct));
$count_alias = $this->query->addField($this->view->storage->get('base_table'), $this->view->storage->get('base_field'), 'num_records', ['count' => TRUE, 'distinct' => $distinct]);
diff --git a/core/modules/views/src/Plugin/views/argument/DayDate.php b/core/modules/views/src/Plugin/views/argument/DayDate.php
index a4a94da0699..fa1a1ebfe48 100644
--- a/core/modules/views/src/Plugin/views/argument/DayDate.php
+++ b/core/modules/views/src/Plugin/views/argument/DayDate.php
@@ -28,7 +28,7 @@ class DayDate extends Date {
public function summaryName($data) {
$day = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);
// strtotime() respects server timezone, so we need to set the time fixed
- // as utc time
+ // as utc time.
return $this->dateFormatter->format(strtotime("200505" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index d3adc61de5a..5c7d9225f0b 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -763,7 +763,7 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte
return $this->view->displayHandlers->get($display_id)->getRoutedDisplay();
}
- // No routed display exists, so return NULL
+ // No routed display exists, so return NULL.
return NULL;
}
diff --git a/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php
index 65eaa6991e4..214b1e1026d 100644
--- a/core/modules/views/src/Plugin/views/display/PathPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php
@@ -213,7 +213,7 @@ abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouter
// Store whether the view will return a response.
$route->setOption('returns_response', !empty($this->getPluginDefinition()['returns_response']));
- // Symfony 4 requires that UTF-8 route patterns have the "utf8" option set
+ // Symfony 4 requires that UTF-8 route patterns have the "utf8" option set.
$route->setOption('utf8', TRUE);
return $route;
diff --git a/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php b/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
index ec4808deae9..c6d3e39405a 100644
--- a/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
+++ b/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
@@ -201,7 +201,7 @@ abstract class ExposedFormPluginBase extends PluginBase implements CacheableDepe
$form['actions']['submit']['#value'] = $this->options['submit_button'];
}
- // Check if there is exposed sorts for this view
+ // Check if there is exposed sorts for this view.
$exposed_sorts = [];
$exposed_sorts_options = [];
foreach ($this->view->sort as $id => $handler) {
diff --git a/core/modules/views/src/Plugin/views/field/Custom.php b/core/modules/views/src/Plugin/views/field/Custom.php
index 29c840d2790..870983b557a 100644
--- a/core/modules/views/src/Plugin/views/field/Custom.php
+++ b/core/modules/views/src/Plugin/views/field/Custom.php
@@ -48,7 +48,7 @@ class Custom extends FieldPluginBase {
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
- // Remove the checkbox
+ // Remove the checkbox.
unset($form['alter']['alter_text']);
unset($form['alter']['text']['#states']);
unset($form['alter']['help']['#states']);
diff --git a/core/modules/views/src/Plugin/views/field/EntityField.php b/core/modules/views/src/Plugin/views/field/EntityField.php
index ad9f935e160..9e1de3ee8e6 100644
--- a/core/modules/views/src/Plugin/views/field/EntityField.php
+++ b/core/modules/views/src/Plugin/views/field/EntityField.php
@@ -227,7 +227,7 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac
$this->limit_values = TRUE;
}
- // If "First and last only" is chosen, limit the values
+ // If "First and last only" is chosen, limit the values.
if (!empty($this->options['delta_first_last'])) {
$this->limit_values = TRUE;
}
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index b60cfbf199d..7fdd3dd024e 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -193,7 +193,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
*/
protected function addAdditionalFields($fields = NULL) {
if (!isset($fields)) {
- // Notice check
+ // Notice check.
if (empty($this->additional_fields)) {
return;
}
@@ -1565,7 +1565,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
}
$alt = $this->viewsTokenReplace($alter['alt'], $tokens);
- // Set the title attribute of the link only if it improves accessibility
+ // Set the title attribute of the link only if it improves accessibility.
if ($alt && $alt != $text) {
$options['attributes']['title'] = Html::decodeEntities($alt);
}
@@ -1630,7 +1630,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
$final_url = CoreUrl::fromUri($path, $options);
// Build the link based on our altered Url object, adding on the optional
- // prefix and suffix
+ // prefix and suffix.
$render = [
'#type' => 'link',
'#title' => $text,
@@ -1885,7 +1885,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
$value = $matches[1];
}
}
- // Remove scraps of HTML entities from the end of a strings
+ // Remove scraps of HTML entities from the end of a strings.
$value = rtrim(preg_replace('/(?:<(?!.+>)|&(?!.+;)).*$/us', '', $value));
if (!empty($alter['ellipsis'])) {
diff --git a/core/modules/views/src/Plugin/views/filter/Combine.php b/core/modules/views/src/Plugin/views/filter/Combine.php
index ffb13966844..4ab58875333 100644
--- a/core/modules/views/src/Plugin/views/filter/Combine.php
+++ b/core/modules/views/src/Plugin/views/filter/Combine.php
@@ -35,7 +35,7 @@ class Combine extends StringFilter {
parent::buildOptionsForm($form, $form_state);
$this->view->initStyle();
- // Allow to choose all fields as possible
+ // Allow to choose all fields as possible.
if ($this->view->style_plugin->usesFields()) {
$options = [];
foreach ($this->view->display_handler->getHandlers('field') as $name => $field) {
diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php
index 233c2067d07..54bf215b8d6 100644
--- a/core/modules/views/src/Plugin/views/filter/StringFilter.php
+++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php
@@ -389,7 +389,7 @@ class StringFilter extends FilterPluginBase implements FilterOperatorsInterface
$operator = $this->getConditionOperator('LIKE');
foreach ($matches as $match) {
$phrase = FALSE;
- // Strip off phrase quotes
+ // Strip off phrase quotes.
if ($match[2][0] == '"') {
$match[2] = substr($match[2], 1, -1);
$phrase = TRUE;
diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php
index db329710cb7..92b8ee4d1e4 100644
--- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php
+++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php
@@ -398,7 +398,7 @@ class JoinPluginBase extends PluginBase implements JoinPluginInterface {
}
// Convert a single-valued array of values to the single-value case,
- // and transform from IN() notation to = notation
+ // and transform from IN() notation to = notation.
if (is_array($info['value']) && count($info['value']) == 1) {
$info['value'] = array_shift($info['value']);
}
diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
index a3dd5d95cb7..597a4ee91a8 100644
--- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
+++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
@@ -190,7 +190,7 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency
$group = empty($groups) ? 1 : max(array_keys($groups)) + 1;
}
- // Create an empty group
+ // Create an empty group.
if (empty($groups[$group])) {
$groups[$group] = ['conditions' => [], 'args' => []];
}
diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index 815bce2b838..1e9620cecec 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -229,7 +229,7 @@ class Sql extends QueryPluginBase {
'join' => NULL,
];
- // Init the tables with our primary table
+ // Init the tables with our primary table.
$this->tables[$base_table][$base_table] = [
'count' => 1,
'alias' => $base_table,
@@ -625,7 +625,7 @@ class Sql extends QueryPluginBase {
* cannot be ensured.
*/
public function ensureTable($table, $relationship = NULL, ?JoinPluginBase $join = NULL) {
- // Ensure a relationship
+ // Ensure a relationship.
if (empty($relationship)) {
$relationship = $this->view->storage->get('base_table');
}
@@ -782,7 +782,7 @@ class Sql extends QueryPluginBase {
}
// First, if this is our link point/anchor table, just use the
- // relationship
+ // relationship.
if ($join->leftTable == $this->relationships[$relationship]['table']) {
$join->leftTable = $relationship;
}
@@ -882,14 +882,14 @@ class Sql extends QueryPluginBase {
$alias = $table . '_' . $field;
}
- // Make sure an alias is assigned
+ // Make sure an alias is assigned.
$alias = $alias ?: $field;
// PostgreSQL truncates aliases to 63 characters:
// https://www.drupal.org/node/571548.
// We limit the length of the original alias up to 60 characters
- // to get a unique alias later if its have duplicates
+ // to get a unique alias later if its have duplicates.
$alias = strtolower(substr($alias, 0, 60));
// Create a field info array.
diff --git a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
index 14225c3f445..96b6d33d1b2 100644
--- a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
+++ b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
@@ -191,7 +191,7 @@ class GroupwiseMax extends RelationshipPluginBase {
// Either load another view, or create one on the fly.
if ($options['subquery_view']) {
$temp_view = Views::getView($options['subquery_view']);
- // Remove all fields from default display
+ // Remove all fields from default display.
unset($temp_view->display['default']['display_options']['fields']);
}
else {
diff --git a/core/modules/views/src/Plugin/views/sort/SortPluginBase.php b/core/modules/views/src/Plugin/views/sort/SortPluginBase.php
index 79e537cfd67..9b5acc29d54 100644
--- a/core/modules/views/src/Plugin/views/sort/SortPluginBase.php
+++ b/core/modules/views/src/Plugin/views/sort/SortPluginBase.php
@@ -100,7 +100,7 @@ abstract class SortPluginBase extends HandlerBase implements CacheableDependency
$form['expose_button'] = [
'#prefix' => '<div class="views-expose clearfix">',
'#suffix' => '</div>',
- // Should always come first
+ // Should always come first.
'#weight' => -1000,
];
diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
index ca8df3ba8fe..ffe742452c9 100644
--- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php
+++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
@@ -575,7 +575,7 @@ abstract class StylePluginBase extends PluginBase {
$groupings = [['field' => $groupings, 'rendered' => $rendered]];
}
- // Make sure fields are rendered
+ // Make sure fields are rendered.
$this->renderFields($this->view->result);
$sets = [];
if ($groupings) {
@@ -710,7 +710,7 @@ abstract class StylePluginBase extends PluginBase {
// - HTML views are rendered inside a render context: then we want to
// use ::render(), so that attachments and cacheability are bubbled.
// - non-HTML views are rendered outside a render context: then we
- // want to use ::renderInIsolation(), so that no bubbling happens
+ // want to use ::renderInIsolation(), so that no bubbling happens.
if ($renderer->hasRenderContext()) {
$renderer->render($data);
}
diff --git a/core/modules/views/src/Plugin/views/style/Table.php b/core/modules/views/src/Plugin/views/style/Table.php
index 561628ac682..d14e433c2f3 100644
--- a/core/modules/views/src/Plugin/views/style/Table.php
+++ b/core/modules/views/src/Plugin/views/style/Table.php
@@ -191,7 +191,7 @@ class Table extends StylePluginBase implements CacheableDependencyInterface {
}
// If the field is the column, mark it so, or the column
- // it's set to is a column, that's ok
+ // it's set to is a column, that's ok.
if ($field == $column || $columns[$column] == $column && !empty($sanitized[$column])) {
$sanitized[$field] = $column;
}
@@ -332,7 +332,7 @@ class Table extends StylePluginBase implements CacheableDependencyInterface {
'#return_value' => $field,
'#parents' => ['style_options', 'default'],
'#id' => $radio_id,
- // Because 'radio' doesn't fully support '#id' =(
+ // Because 'radio' doesn't fully support "'#id' =(".
'#attributes' => ['id' => $radio_id],
'#default_value' => $default,
'#states' => [
@@ -395,13 +395,13 @@ class Table extends StylePluginBase implements CacheableDependencyInterface {
],
];
- // Markup for the field name
+ // Markup for the field name.
$form['info'][$field]['name'] = [
'#markup' => $field_names[$field],
];
}
- // Provide a radio for no default sort
+ // Provide a radio for no default sort.
$form['default'][-1] = [
'#title' => $this->t('No default sort'),
'#title_display' => 'invisible',
diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
index d53e93cecec..802c73144e6 100644
--- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
+++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
@@ -722,7 +722,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
* arrays of options for that display.
*/
protected function buildDisplayOptions($form, FormStateInterface $form_state) {
- // Display: Default
+ // Display: Default.
$display_options['default'] = $this->defaultDisplayOptions();
$display_options['default'] += [
'filters' => [],
@@ -731,17 +731,17 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
$display_options['default']['filters'] += $this->defaultDisplayFilters($form, $form_state);
$display_options['default']['sorts'] += $this->defaultDisplaySorts($form, $form_state);
- // Display: Page
+ // Display: Page.
if (!$form_state->isValueEmpty(['page', 'create'])) {
$display_options['page'] = $this->pageDisplayOptions($form, $form_state);
- // Display: Feed (attached to the page)
+ // Display: Feed (attached to the page).
if (!$form_state->isValueEmpty(['page', 'feed'])) {
$display_options['feed'] = $this->pageFeedDisplayOptions($form, $form_state);
}
}
- // Display: Block
+ // Display: Block.
if (!$form_state->isValueEmpty(['block', 'create'])) {
$display_options['block'] = $this->blockDisplayOptions($form, $form_state);
}
@@ -773,13 +773,13 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
// instances.
$executable = $view->getExecutable();
- // Display: Default
+ // Display: Default.
$default_display = $executable->newDisplay('default', 'Default', 'default');
foreach ($display_options['default'] as $option => $value) {
$default_display->setOption($option, $value);
}
- // Display: Page
+ // Display: Page.
if (isset($display_options['page'])) {
$display = $executable->newDisplay('page', 'Page', 'page_1');
// The page display is usually the main one (from the user's point of
diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php
index 407260ed285..554c38cdaba 100644
--- a/core/modules/views/src/ViewExecutable.php
+++ b/core/modules/views/src/ViewExecutable.php
@@ -157,7 +157,7 @@ class ViewExecutable {
// phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
public $feedIcons = [];
- // Exposed widget input
+ // Exposed widget input.
/**
* All the form data from $form_state->getValues().
@@ -1177,7 +1177,7 @@ class ViewExecutable {
// use whatever value the argument handler now has, not the raw value.
$substitutions["{{ raw_arguments.$id }}"] = strip_tags(Html::decodeEntities($argument->getValue()));
- // Test to see if we should use this argument's title
+ // Test to see if we should use this argument's title.
if (!empty($argument->options['title_enable']) && !empty($argument->options['title'])) {
$title = $argument->options['title'];
}
@@ -1385,7 +1385,7 @@ class ViewExecutable {
$this->built = TRUE;
$this->build_time = microtime(TRUE) - $start;
- // Attach displays
+ // Attach displays.
$this->attachDisplays();
// Let modules modify the view just after building it.
@@ -1688,7 +1688,7 @@ class ViewExecutable {
$this->preExecute($args);
- // Execute the view
+ // Execute the view.
$output = $this->display_handler->execute();
$this->postExecute();
@@ -1750,7 +1750,7 @@ class ViewExecutable {
// Allow hook_views_pre_view() to set the dom_id, then ensure it is set.
$this->dom_id = !empty($this->dom_id) ? $this->dom_id : hash('sha256', $this->storage->id() . \Drupal::time()->getRequestTime() . mt_rand());
- // Allow the display handler to set up for execution
+ // Allow the display handler to set up for execution.
$this->display_handler->preExecute();
}
@@ -2336,10 +2336,10 @@ class ViewExecutable {
public function getHandler($display_id, $type, $id) {
// Get info about the types so we can get the right data.
$types = static::getHandlerTypes();
- // Initialize the display
+ // Initialize the display.
$this->setDisplay($display_id);
- // Get the existing configuration
+ // Get the existing configuration.
$fields = $this->displayHandlers->get($display_id)->getOption($types[$type]['plural']);
return $fields[$id] ?? NULL;
diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php
index 87a2bc2f5d8..46393b68e0c 100644
--- a/core/modules/views/src/Views.php
+++ b/core/modules/views/src/Views.php
@@ -436,13 +436,13 @@ class Views {
if (!isset(static::$handlerTypes)) {
static::$handlerTypes = [
'field' => [
- // Title
+ // Title.
'title' => static::t('Fields'),
// Lowercase title for mid-sentence.
'ltitle' => static::t('fields'),
// Singular title.
'stitle' => static::t('Field'),
- // Singular lowercase title for mid sentence
+ // Singular lowercase title for mid sentence.
'lstitle' => static::t('field'),
'plural' => 'fields',
],
diff --git a/core/modules/views/src/ViewsDataHelper.php b/core/modules/views/src/ViewsDataHelper.php
index a784843d018..2311ab90aa0 100644
--- a/core/modules/views/src/ViewsDataHelper.php
+++ b/core/modules/views/src/ViewsDataHelper.php
@@ -67,7 +67,7 @@ class ViewsDataHelper {
$strings = [];
$skip_bases = [];
foreach ($table_data as $field => $info) {
- // Collect table data from this table
+ // Collect table data from this table.
if ($field == 'table') {
// Calculate what tables this table can join to.
if (!empty($info['join'])) {
@@ -96,15 +96,15 @@ class ViewsDataHelper {
}
}
foreach (['title', 'group', 'help', 'base', 'aliases'] as $string) {
- // First, try the lowest possible level
+ // First, try the lowest possible level.
if (!empty($info[$key][$string])) {
$strings[$field][$key][$string] = $info[$key][$string];
}
- // Then try the field level
+ // Then try the field level.
elseif (!empty($info[$string])) {
$strings[$field][$key][$string] = $info[$string];
}
- // Finally, try the table level
+ // Finally, try the table level.
elseif (!empty($table_data['table'][$string])) {
$strings[$field][$key][$string] = $table_data['table'][$string];
}