diff --git a/composer/Plugin/Scaffold/Plugin.php b/composer/Plugin/Scaffold/Plugin.php index 2f5214fb225f0ea73e9eac0a6305673c2278a53d..8fe6961424cf6340306510306b60d541275210a1 100644 --- a/composer/Plugin/Scaffold/Plugin.php +++ b/composer/Plugin/Scaffold/Plugin.php @@ -128,9 +128,11 @@ public function onCommand(CommandEvent $event) { } /** - * Lazy-instantiate the handler object. It is dangerous to update a Composer - * plugin if it loads any classes prior to the `composer update` operation, - * and later tries to use them in a post-update hook. + * Instantiates the handler object upon demand. + * + * It is dangerous to update a Composer plugin if it loads any classes prior + * to the `composer update` operation, and later tries to use them in a + * post-update hook. */ protected function handler() { if (!$this->handler) { diff --git a/core/lib/Drupal/Component/Gettext/PoItem.php b/core/lib/Drupal/Component/Gettext/PoItem.php index 3ef8a2acea81d254c5092204ee345086d71ff11d..7bb256d309be1b5cb381b4873e39c6f798f4b3ad 100644 --- a/core/lib/Drupal/Component/Gettext/PoItem.php +++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -103,8 +103,7 @@ public function setContext($context) { } /** - * Gets the source string or the array of strings if the translation has - * plurals. + * Gets the source string(s) if the translation has plurals. * * @return string or array $translation */ @@ -113,8 +112,7 @@ public function getSource() { } /** - * Set the source string or the array of strings if the translation has - * plurals. + * Sets the source string(s) if the translation has plurals. * * @param string|array $source * The source string or the array of strings if the translation has plurals. @@ -124,8 +122,7 @@ public function setSource($source) { } /** - * Gets the translation string or the array of strings if the translation has - * plurals. + * Gets the translation string(s) if the translation has plurals. * * @return string or array $translation */ @@ -134,8 +131,7 @@ public function getTranslation() { } /** - * Set the translation string or the array of strings if the translation has - * plurals. + * Sets the translation string(s) if the translation has plurals. * * @param string|array $translation * The translation string or the array of strings if the translation has diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php index ff1949418f8f85c1c3fc0170e113a89e21e8bcd7..be287f99bfc8d96c468ac27dcf8fb8ce611364e3 100644 --- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php +++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php @@ -185,8 +185,7 @@ public function garbageCollection() { } /** - * Gets the full path of the containing directory where the file is or should - * be stored. + * Gets the full path of the file storage directory's parent. * * @param string $name * The virtual file name. Can be a relative path. diff --git a/core/lib/Drupal/Component/Utility/Color.php b/core/lib/Drupal/Component/Utility/Color.php index 69239f916f1ca738ab8aaf314e1c6a301045db53..8aeb9f61341a1fa1d1c886ee02680c62dbbb9c0d 100644 --- a/core/lib/Drupal/Component/Utility/Color.php +++ b/core/lib/Drupal/Component/Utility/Color.php @@ -58,8 +58,7 @@ public static function hexToRgb($hex) { } /** - * Converts RGB color arrays and RGB strings in CSS notation to lowercase - * simple colors like '#aabbcc'. + * Converts RGB color arrays or strings to lowercase CSS notation. * * @param array|string $input * The value to convert. If the value is an array the first three elements diff --git a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php index 14e45059efcec966f7f91098f3b98fe67a5a9324..e9e4998010bd9ee06e5bc60cdaa97ac1a91de008 100644 --- a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php +++ b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php @@ -137,8 +137,7 @@ protected function createElement($definition, $value, $key) { } /** - * Creates a new data definition object from a type definition array and - * actual configuration data. + * Creates a new data definition object from an array and configuration. * * @param array $definition * The base type definition array, for which a data definition should be diff --git a/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php b/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php index 5c3779fd1a20511258219f3d361a6b1d418ff3f9..b87c600fa553ffa9af19f7d65655361dcad925f0 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php @@ -26,9 +26,10 @@ interface TypedConfigManagerInterface extends TypedDataManagerInterface { public function get($name); /** - * Creates a new data definition object from a type definition array and - * actual configuration data. Since type definitions may contain variables - * to be replaced, we need the configuration value to create it. + * Creates a new data definition object. + * + * Since type definitions may contain variables to be replaced, we need the + * configuration value to create it. * * @param array $definition * The base type definition array, for which a data definition should be diff --git a/core/lib/Drupal/Core/Database/Query/SelectInterface.php b/core/lib/Drupal/Core/Database/Query/SelectInterface.php index d89693fd6fdcbc1220c76202aff42d46494f4799..2c4416ad26c6a1023e2574cabf17d0a85efdb9f9 100644 --- a/core/lib/Drupal/Core/Database/Query/SelectInterface.php +++ b/core/lib/Drupal/Core/Database/Query/SelectInterface.php @@ -104,8 +104,9 @@ public function &getGroupBy(); public function &getTables(); /** - * Returns a reference to the union queries for this query. This include - * queries for UNION, UNION ALL, and UNION DISTINCT. + * Returns a reference to the union queries for this query. + * + * This includes queries for UNION, UNION ALL, and UNION DISTINCT. * * Because this method returns by reference, alter hooks may edit the tables * array directly to make their changes. If just adding union queries, diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php index 11e24a8d73dd3abfea87197f4ba355d3137f5a9b..bb851104a9eaaa81a0db929531d88a12064be2c9 100644 --- a/core/lib/Drupal/Core/Database/Schema.php +++ b/core/lib/Drupal/Core/Database/Schema.php @@ -687,8 +687,7 @@ public function prepareComment($comment, $length = NULL) { } /** - * Return an escaped version of its parameter to be used as a default value - * on a column. + * Escapes a value to be used as the default value on a column. * * @param mixed $value * The value to be escaped (int, float, null or string). diff --git a/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php b/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php index 25c3141105d008582c1621a872faef14d3b88573..ca7c7c8f92bf7edbc7f22a6565242f9aff94226f 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php @@ -109,6 +109,8 @@ public function access(EntityInterface $entity, $operation, AccountInterface $ac } /** + * Determines entity access. + * * We grant access to the entity if both of these conditions are met: * - No modules say to deny access. * - At least one module says to grant access. diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php index c8ece6daf6b3e2f83feaf13bb85aad0a671a89c6..2bf3ebf859eb37988cb442e64a265dae97042d11 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php @@ -662,8 +662,10 @@ protected function buildImplementationInfo($hook) { } /** - * Verifies an array of implementations loaded from the cache, by including - * the lazy-loaded $module.$group.inc, and checking function_exists(). + * Verifies an array of implementations loaded from cache. + * + * Verification is done by including the lazy-loaded $module.$group.inc file, + * and checking function_exists(). * * @param string[] $implementations * Implementation "group" by module name. diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php index 70cbcad101642aebb756ffb74564c5488cb0bcfd..34007fa8c3bcd8c83fc618d5675074ce12784c2a 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php @@ -388,8 +388,10 @@ public function alter($type, &$data, &$context1 = NULL, &$context2 = NULL); public function alterDeprecated($description, $type, &$data, &$context1 = NULL, &$context2 = NULL); /** - * Returns an array of directories for all enabled modules. Useful for - * tasks such as finding a file that exists in all module directories. + * Returns an array of directories for all enabled modules. + * + * This is useful for tasks such as finding a file that exists in all module + * directories. * * @return array */ diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 146b9fd68e32bc151b5230bc05e1afb36efe8edd..552f8580b33b7290195f9e93d142eb4823e12d7c 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -637,8 +637,6 @@ public function getSettableOptions(AccountInterface $account = NULL) { /** * Render API callback: Processes the field settings form. * - * Allows access to the form state. - * * @see static::fieldSettingsForm() */ public static function fieldSettingsAjaxProcess($form, FormStateInterface $form_state) { @@ -647,8 +645,7 @@ public static function fieldSettingsAjaxProcess($form, FormStateInterface $form_ } /** - * Adds entity_reference specific properties to AJAX form elements from the - * field settings form. + * Adds the field settings to AJAX form elements. * * @see static::fieldSettingsAjaxProcess() */ @@ -667,9 +664,10 @@ public static function fieldSettingsAjaxProcessElement(&$element, $main_form) { } /** - * Render API callback: Moves entity_reference specific Form API elements - * (i.e. 'handler_settings') up a level for easier processing by the - * validation and submission handlers. + * Render API callback that moves entity reference elements up a level. + * + * The elements (i.e. 'handler_settings') are moved for easier processing by + * the validation and submission handlers. * * @see _entity_reference_field_settings_process() */ diff --git a/core/lib/Drupal/Core/File/FileSystem.php b/core/lib/Drupal/Core/File/FileSystem.php index 02175f9e109e331e8ffce2bfec5febb19731736b..36d802f52f38a7fd968420996f194b08db7973e5 100644 --- a/core/lib/Drupal/Core/File/FileSystem.php +++ b/core/lib/Drupal/Core/File/FileSystem.php @@ -240,8 +240,7 @@ public function mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) { } /** - * Helper function. Ensures we don't pass a NULL as a context resource to - * mkdir(). + * Ensures we don't pass a NULL as a context resource to mkdir(). * * @see self::mkdir() */ diff --git a/core/lib/Drupal/Core/File/FileSystemInterface.php b/core/lib/Drupal/Core/File/FileSystemInterface.php index 6addeeba9548fb557ad66f4d1b3074d8dc973694..852a3d41e99b995cb5d018df5a539e92d2d837c4 100644 --- a/core/lib/Drupal/Core/File/FileSystemInterface.php +++ b/core/lib/Drupal/Core/File/FileSystemInterface.php @@ -173,8 +173,7 @@ public function dirname($uri); public function basename($uri, $suffix = NULL); /** - * Creates a directory, optionally creating missing components in the path to - * the directory. + * Creates a directory, optionally creating missing components in the path. * * When PHP's mkdir() creates a directory, the requested mode is affected by * the process's umask. This function overrides the umask and sets the mode diff --git a/core/lib/Drupal/Core/Flood/FloodInterface.php b/core/lib/Drupal/Core/Flood/FloodInterface.php index fd98398fea8356e4e7880455b5995049cbc7612d..4a1c576de3d54286cd01247785a6732358ad1eec 100644 --- a/core/lib/Drupal/Core/Flood/FloodInterface.php +++ b/core/lib/Drupal/Core/Flood/FloodInterface.php @@ -61,8 +61,9 @@ public function clear($name, $identifier = NULL); public function isAllowed($name, $threshold, $window = 3600, $identifier = NULL); /** - * Cleans up expired flood events. This method is called automatically on - * cron run. + * Cleans up expired flood events. + * + * This method is called automatically on cron run. * * @see system_cron() */ diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index cec98161251c518939a327f297479c890823d3b7..c198063266da74732b89431b389852487828e252 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -108,8 +108,10 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS protected $formCache; /** - * Defines element value callables which are safe to run even when the form - * state has an invalid CSRF token. + * Defines callables that are safe to run with invalid CSRF tokens. + * + * These Element value callables are safe to run even when the form state has + * an invalid CSRF token. * * Excluded from this list on purpose: * - Drupal\file\Element\ManagedFile::valueCallback diff --git a/core/lib/Drupal/Core/Image/ImageInterface.php b/core/lib/Drupal/Core/Image/ImageInterface.php index 4bb6a9a671d1de3e3c57a0d1fc9e81e1eceb70f4..cb43798fec2574f8ad59458cf35062822f63fba8 100644 --- a/core/lib/Drupal/Core/Image/ImageInterface.php +++ b/core/lib/Drupal/Core/Image/ImageInterface.php @@ -170,8 +170,7 @@ public function scale($width, $height = NULL, $upscale = FALSE); public function scaleAndCrop($width, $height); /** - * Instructs the toolkit to save the image in the format specified by the - * extension. + * Converts an image to the format specified by the extension. * * @param string $extension * The extension to convert to (for instance, 'jpeg' or 'png'). Allowed diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php index dcc3b3d12134ab43ba5f35f10c9267549b4a674e..3bf329aba612873152df3f42968aabba8aeca146 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php @@ -86,8 +86,7 @@ protected function getToolkit() { abstract protected function arguments(); /** - * Checks if required arguments are passed in and adds defaults for non passed - * in optional arguments. + * Checks for required arguments and adds optional argument defaults. * * Image toolkit operation implementers should not normally need to override * this method as they should place their own validation in validateArguments. diff --git a/core/lib/Drupal/Core/Routing/FilterInterface.php b/core/lib/Drupal/Core/Routing/FilterInterface.php index 5f70088677807a6334434fb9d922ae7db9ec3085..0686c19bf824615c74566fca5f7fb58389f1d0e1 100644 --- a/core/lib/Drupal/Core/Routing/FilterInterface.php +++ b/core/lib/Drupal/Core/Routing/FilterInterface.php @@ -11,8 +11,7 @@ interface FilterInterface { /** - * Filters the route collection against a request and returns all matching - * routes. + * Filters the route collection against a request. * * @param \Symfony\Component\Routing\RouteCollection $collection * The collection against which to match. diff --git a/core/lib/Drupal/Core/Routing/Router.php b/core/lib/Drupal/Core/Routing/Router.php index 94eaf5bf7bbb8deac5a270970e169939ca19c6da..369424d90815df958b6abd241070d435e19dd3cf 100644 --- a/core/lib/Drupal/Core/Routing/Router.php +++ b/core/lib/Drupal/Core/Routing/Router.php @@ -311,8 +311,9 @@ public function getRouteCollection(): RouteCollection { } /** - * This method is intentionally not implemented. Use - * Drupal\Core\Url instead. + * This method is intentionally not implemented. + * + * Use Drupal\Core\Url instead. * * @see https://www.drupal.org/node/2820197 * diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index 258d9c0222231ca9130c6f45e6c96f1122d0314a..2eda886d62dda807714cc75af931c9eb02063f0e 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -50,8 +50,7 @@ class TwigEnvironment extends Environment { protected $twigCachePrefix = ''; /** - * Constructs a TwigEnvironment object and stores cache and storage - * internally. + * Creates a TwigEnvironment object, including its cache and storage. * * @param string $root * The app root. diff --git a/core/modules/content_translation/src/ContentTranslationHandlerInterface.php b/core/modules/content_translation/src/ContentTranslationHandlerInterface.php index 8534a539ab688a7d6cb3aea1bc270471e6672b1d..c3b9e4cf8907d69b0650bd1f6ec98ea25fcacc7c 100644 --- a/core/modules/content_translation/src/ContentTranslationHandlerInterface.php +++ b/core/modules/content_translation/src/ContentTranslationHandlerInterface.php @@ -21,8 +21,7 @@ interface ContentTranslationHandlerInterface { public function getFieldDefinitions(); /** - * Checks if the user can perform the given operation on translations of the - * wrapped entity. + * Checks that the user can perform the operation on the entity translation. * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity whose translation has to be accessed. diff --git a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php index 70bd4a71668c8bae57882457e28e86ce1e970048..e5a48e65751e49f06b6e02b965982a25ca2dbf1a 100644 --- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php +++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php @@ -339,8 +339,7 @@ public static function value($element, $input, FormStateInterface $form_state) { } /** - * Form element validation callback for upload element on file widget. Checks - * if user has uploaded more files than allowed. + * Validates the number of uploaded files. * * This validator is used only when cardinality not set to 1 or unlimited. */ diff --git a/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php b/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php index a17986c8e4621c6b038e0a4f76fb28a5081a4e9e..5aa830acf5481160144ade062ed63c9bcdb4a5d3 100644 --- a/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php +++ b/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php @@ -88,8 +88,11 @@ public function getMessage() { } /** - * Gets the severity level of the message (one of the - * MigrationInterface::MESSAGE_* constants). + * Gets the severity level of the message. + * + * Message levels are declared in MigrationInterface and start with MESSAGE_. + * + * @see \Drupal\migrate\Plugin\MigrationInterface * * @return int * The message level. diff --git a/core/modules/migrate/src/Plugin/MigrationInterface.php b/core/modules/migrate/src/Plugin/MigrationInterface.php index 61942a21f6fbe69a3d76be7917a467cdd74a5b7a..2435ad5d324892c39ab4843673b07d2ad313d2fa 100644 --- a/core/modules/migrate/src/Plugin/MigrationInterface.php +++ b/core/modules/migrate/src/Plugin/MigrationInterface.php @@ -195,8 +195,7 @@ public function getInterruptionResult(); public function clearInterruptionResult(); /** - * Signal that the migration should be interrupted with the specified result - * code. + * Sets the migration status as interrupted with a given result code. * * @param int $result * One of the MigrationInterface::RESULT_* constants. @@ -204,8 +203,7 @@ public function clearInterruptionResult(); public function interruptMigration($result); /** - * Get the normalized process pipeline configuration describing the process - * plugins. + * Gets the normalized process plugin configuration. * * The process configuration is always normalized. All shorthand processing * will be expanded into their full representations. diff --git a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php index a3925d50d88a0f8c893717e2536248ffdc188b0d..3191c7256d4a3494152ed4e16418da8a51df810c 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -528,8 +528,9 @@ protected function getCache() { } /** - * Gets the source count checking if the source is countable or using the - * iterator_count function. + * Gets the source count. + * + * Checks if the source is countable or using the iterator_count function. * * @return int */ diff --git a/core/modules/node/src/Plugin/views/argument/Type.php b/core/modules/node/src/Plugin/views/argument/Type.php index 135e3952cb3c891cfcb346eb6b113e48b708bcc6..625aef6abbea4051bb9cf96cba5bc18361b3fbd9 100644 --- a/core/modules/node/src/Plugin/views/argument/Type.php +++ b/core/modules/node/src/Plugin/views/argument/Type.php @@ -52,16 +52,14 @@ public static function create(ContainerInterface $container, array $configuratio } /** - * Override the behavior of summaryName(). Get the user friendly version - * of the node type. + * {@inheritdoc} */ public function summaryName($data) { return $this->node_type($data->{$this->name_alias}); } /** - * Override the behavior of title(). Get the user friendly version of the - * node type. + * {@inheritdoc} */ public function title() { return $this->node_type($this->argument); diff --git a/core/modules/node/src/Plugin/views/field/Node.php b/core/modules/node/src/Plugin/views/field/Node.php index f81777e42199b7a4102439456b624f3e910afd84..94cb1a244191898a1c71144934d03e6b9d1f8cfe 100644 --- a/core/modules/node/src/Plugin/views/field/Node.php +++ b/core/modules/node/src/Plugin/views/field/Node.php @@ -11,8 +11,10 @@ /** * Field handler to provide simple renderer that allows linking to a node. + * * Definition terms: - * - link_to_node default: Should this field have the checkbox "link to node" enabled by default. + * - link_to_node default: Should this field have the checkbox "link to node" + * enabled by default. * * @ingroup views_field_handlers * diff --git a/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php b/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php index 9bb86554ac74711aa3f2c2b4175c3c11c004b307..62bb9aedfcf762c241f02fb80d717f9318394657 100644 --- a/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php +++ b/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php @@ -321,8 +321,7 @@ protected function createTableSql($name, $table) { } /** - * Create an SQL string for a field to be used in table creation or - * alteration. + * Creates a safe SQL string for a field for table creation or alteration. * * @param $name * Name of the field. @@ -1029,8 +1028,9 @@ public function getComment($table, $column = NULL) { } /** - * Calculates a base-64 encoded, PostgreSQL-safe sha-256 hash per PostgreSQL - * documentation: 4.1. Lexical Structure. + * Calculates a base-64 encoded PostgreSQL-safe sha-256 hash. + * + * The hash is modified to according to @link https://www.postgresql.org/docs/current/sql-syntax-lexical.html PostgreSQL Lexical Structure@endlink. * * @param $data * String to be hashed. diff --git a/core/modules/search/src/SearchPageListBuilder.php b/core/modules/search/src/SearchPageListBuilder.php index 1ee866c345a0a9bd072a7a91ac1d885ec898b56f..8b844a6b5e488988bd72db6d90103ee4e70672b5 100644 --- a/core/modules/search/src/SearchPageListBuilder.php +++ b/core/modules/search/src/SearchPageListBuilder.php @@ -369,8 +369,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { } /** - * Form submission handler for the reindex button on the search admin settings - * form. + * Form submission handler for reindex button on search admin settings form. */ public function searchAdminReindexSubmit(array &$form, FormStateInterface $form_state) { // Send the user to the confirmation page. diff --git a/core/modules/views/src/ManyToOneHelper.php b/core/modules/views/src/ManyToOneHelper.php index 5bf9df8ad5e6a7e5b49af975bb6363c5de333335..7f493ddb76f7b517db4556ffa0260eaaa22b11ae 100644 --- a/core/modules/views/src/ManyToOneHelper.php +++ b/core/modules/views/src/ManyToOneHelper.php @@ -128,8 +128,10 @@ public function getJoin() { } /** - * Provide the proper join for summary queries. This is important in part because - * it will cooperate with other arguments if possible. + * Provides the proper join for summary queries. + * + * This is important in part because it will cooperate with other arguments if + * possible. */ public function summaryJoin() { $field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field; diff --git a/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php b/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php index 55df6484efdba31d0a2c925f5630649d726821fa..2b0d2d12b84e7c55810f79512928a686958fadf7 100644 --- a/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php +++ b/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php @@ -29,8 +29,7 @@ public function defineOptions() { } /** - * Ensure the main table for this handler is in the query. This is used - * a lot. + * Ensures that the main table for this handler is in the query. * * @see \Drupal\views\Plugin\views\HandlerBase::ensureMyTable() */ diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php index 042658dc657260de062c5766c032cf4675a91f24..ad7ee244e39cc4a219da59ec54b52221ace5ef7c 100644 --- a/core/modules/views/src/Plugin/views/HandlerBase.php +++ b/core/modules/views/src/Plugin/views/HandlerBase.php @@ -365,6 +365,8 @@ public function submitGroupByForm(&$form, FormStateInterface $form_state) { } /** + * Determines if the handler has extra options. + * * If a handler has 'extra options' it will get a little settings widget and * another form called extra_options. */ @@ -402,8 +404,7 @@ public function canExpose() { } /** - * Set new exposed option defaults when exposed setting is flipped - * on. + * Set new exposed option defaults when exposed setting is flipped on. */ public function defaultExposeOptions() {} @@ -558,8 +559,9 @@ public function ensureMyTable() { public function adminSummary() {} /** - * Determine if this item is 'exposed', meaning it provides form elements - * to let users modify the view. + * Determine if this item is 'exposed'. + * + * Exposed means it provides form elements to let users modify the view. * * @return bool */ @@ -792,6 +794,8 @@ public function displayExposedForm($form, FormStateInterface $form_state) { } /** + * Submits a temporary form. + * * A submit handler that is used for storing temporary items when using * multi-step changes, such as ajax requests. */ diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 7535fe604822a131ec0ef6b54ed1e8682f54dbed..8a895d21bdba9026fef507cbb0e0e1b1ce8e0aec 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -340,8 +340,9 @@ public function globalTokenReplace($string = '', array $options = []) { } /** - * Replaces Views' tokens in a given string. The resulting string will be - * sanitized with Xss::filterAdmin. + * Replaces Views' tokens in a given string. + * + * The resulting string will be sanitized with Xss::filterAdmin. * * @param $text * Unsanitized string with possible tokens. diff --git a/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php b/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php index f86a877c97a9a71d715b2e32d21b821ee9413218..8a61d56548c3a99756f072784e7f24e9640fed82 100644 --- a/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php +++ b/core/modules/views/src/Plugin/views/ViewsHandlerInterface.php @@ -30,14 +30,16 @@ public function preQuery(); public function getEntityType(); /** - * Determines if the handler is considered 'broken', meaning it's a - * placeholder used when a handler can't be found. + * Determines if the handler is considered 'broken'. + * + * Broken means it's a placeholder used when a handler can't be found. */ public function broken(); /** - * Ensure the main table for this handler is in the query. This is used - * a lot. + * Ensures that the main table for this handler is in the query. + * + * This is used a lot. */ public function ensureMyTable(); @@ -111,8 +113,9 @@ public function postExecute(&$values); public function showExposeForm(&$form, FormStateInterface $form_state); /** - * Called just prior to query(), this lets a handler set up any relationship - * it needs. + * Sets up any needed relationship. + * + * This is called just prior to query(). */ public function setRelationship(); diff --git a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php index 4aceb2415af2df5384749ce5dd7a3d7f13a2be14..93d75c9974d63fac4b2629826ef8057e3861adc8 100644 --- a/core/modules/views/src/Plugin/views/ViewsPluginInterface.php +++ b/core/modules/views/src/Plugin/views/ViewsPluginInterface.php @@ -163,8 +163,10 @@ public function validate(); public function query(); /** - * Unpack options over our existing defaults, drilling down into arrays - * so that defaults don't get totally blown away. + * Unpacks options over our existing defaults. + * + * This will drill down into arrays so that defaults don't get totally blown + * away. */ public function unpackOptions(&$storage, $options, $definition = NULL, $all = TRUE, $check = TRUE); diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index 9e39de0410ddc720c99df489fd05b9df14971960..f20db9b0aed2010d5b38c90100a4ee35891e0afc 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -591,8 +591,9 @@ protected function defaultActions($which = NULL) { } /** - * Provide a form for selecting the default argument when the - * default action is set to provide default argument. + * Provides a form for selecting the default argument. + * + * This is used when the default action provides a default argument. */ public function defaultArgumentForm(&$form, FormStateInterface $form_state) { $plugins = Views::pluginManager('argument_default')->getDefinitions(); @@ -656,8 +657,9 @@ public function defaultArgumentForm(&$form, FormStateInterface $form_state) { } /** - * Provide a form for selecting further summary options when the - * default action is set to display one. + * Provides a form for selecting summary options. + * + * This is used when the default action displays a summary. */ public function defaultSummaryForm(&$form, FormStateInterface $form_state) { $style_plugins = Views::pluginManager('style')->getDefinitions(); @@ -822,8 +824,7 @@ public function defaultEmpty() { } /** - * This just returns true. The view argument builder will know where - * to find the argument from. + * Returns true, since the argument builder knows where to find the argument. */ protected function defaultDefault() { return TRUE; @@ -909,7 +910,8 @@ protected function summaryQuery() { } /** - * Add the name field, which is the field displayed in summary queries. + * Adds the name field, which is the field displayed in summary queries. + * * This is often used when the argument is numeric. */ protected function summaryNameField() { @@ -944,6 +946,8 @@ protected function summaryNameField() { } /** + * Adds basic information to the summary query. + * * Some basic summary behavior that doesn't need to be repeated as much as * code that goes into summaryQuery() */ @@ -962,8 +966,9 @@ public function summaryBasics($count_field = TRUE) { } /** - * Sorts the summary based upon the user's selection. The base variant of - * this is usually adequate. + * Sorts the summary based upon the user's selection. + * + * The base variant of this is usually adequate. * * @param $order * The order selected in the UI. @@ -976,8 +981,9 @@ public function summarySort($order, $by = NULL) { } /** - * Provide the argument to use to link from the summary to the next level; - * this will be called once per row of a summary, and used as part of + * Provides the argument to use to link from the summary to the next level. + * + * This will be called once per row of a summary, and used as part of * $view->getUrl(). * * @param $data @@ -988,8 +994,7 @@ public function summaryArgument($data) { } /** - * Provides the name to use for the summary. By default this is just - * the name field. + * Provides the name to use for the summary, defaults to the name field. * * @param $data * The query results for the row. @@ -1022,8 +1027,10 @@ public function title() { } /** - * Called by the view object to get the title. This may be set by a - * validator so we don't necessarily call through to title(). + * Determines the title to use for the view. + * + * This may be set by a validator so we don't necessarily call through to + * title(). */ public function getTitle() { if (isset($this->validated_title)) { diff --git a/core/modules/views/src/Plugin/views/argument/Date.php b/core/modules/views/src/Plugin/views/argument/Date.php index 502e264679729e7978c2e65ae7817674d7631f08..8853b0214cc4239296623bb6715900b6b3bf6a80 100644 --- a/core/modules/views/src/Plugin/views/argument/Date.php +++ b/core/modules/views/src/Plugin/views/argument/Date.php @@ -102,8 +102,7 @@ public function defaultArgumentForm(&$form, FormStateInterface $form_state) { } /** - * Set the empty argument value to the current date, - * formatted appropriately for this argument. + * Gets the date default argument, formatted appropriately for this argument. */ public function getDefaultArgument($raw = FALSE) { if (!$raw && $this->options['default_argument_type'] == 'date') { diff --git a/core/modules/views/src/Plugin/views/argument/NullArgument.php b/core/modules/views/src/Plugin/views/argument/NullArgument.php index 7fadf1688d312ca3c6e2119e7b1c0d42ef1cf620..2c8723810047e106c0f616f6da111a7c1d37d642 100644 --- a/core/modules/views/src/Plugin/views/argument/NullArgument.php +++ b/core/modules/views/src/Plugin/views/argument/NullArgument.php @@ -20,8 +20,7 @@ protected function defineOptions() { } /** - * Override buildOptionsForm() so that only the relevant options - * are displayed to the user. + * {@inheritdoc} */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); @@ -37,8 +36,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { } /** - * Override defaultActions() to remove actions that don't - * make sense for a null argument. + * {@inheritdoc} */ protected function defaultActions($which = NULL) { if ($which) { @@ -54,8 +52,7 @@ protected function defaultActions($which = NULL) { } /** - * Override the behavior of query() to prevent the query - * from being changed in any way. + * {@inheritdoc} */ public function query($group_by = FALSE) {} diff --git a/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php b/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php index 3eb340aff60b0b85005d32acb2c164fd2e6c05b2..7cd85a6175c12c39830182b3964a26eaedafe303 100644 --- a/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument_default/ArgumentDefaultPluginBase.php @@ -89,6 +89,8 @@ public function access() { } /** + * Disables the given option if the user does not have access. + * * If we don't have access to the form but are showing it anyway, ensure that * the form is safe and cannot be changed from user input. * diff --git a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php index ab835b61c2454735b8dbc02abb83fa2381554a93..d372baedc2050d7c670c97a2925b3b17e84de228 100644 --- a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php +++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php @@ -62,8 +62,7 @@ public function getResultsKey() { } /** - * Return a string to display as the clickable title for the - * access control. + * Returns a string to display as the clickable title for the access control. */ public function summaryTitle() { return $this->t('Unknown'); diff --git a/core/modules/views/src/Plugin/views/display/Attachment.php b/core/modules/views/src/Plugin/views/display/Attachment.php index 288696d217bf410038872f0a8f84c413fdeb1302..e6e73fbd8aa823c72e8b6a7f14e7294333acf249 100644 --- a/core/modules/views/src/Plugin/views/display/Attachment.php +++ b/core/modules/views/src/Plugin/views/display/Attachment.php @@ -274,11 +274,11 @@ public function attachTo(ViewExecutable $view, $display_id, array &$build) { } /** - * Attachment displays only use exposed widgets if - * they are set to inherit the exposed filter settings - * of their parent display. + * {@inheritdoc} */ public function usesExposed() { + // Attachment displays only use exposed widgets if they are set to inherit + // the exposed filter settings of their parent display. if (!empty($this->options['inherit_exposed_filters']) && parent::usesExposed()) { return TRUE; } @@ -286,11 +286,12 @@ public function usesExposed() { } /** - * If an attachment is set to inherit the exposed filter - * settings from its parent display, then don't render and - * display a second set of exposed filter widgets. + * {@inheritdoc} */ public function displaysExposed() { + // If an attachment is set to inherit the exposed filter settings from its + // parent display, then don't render and display a second set of exposed + // filter widgets. return $this->options['inherit_exposed_filters'] ? FALSE : TRUE; } diff --git a/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php b/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php index 630c0f0a15ca8e04f846e0d9dc8ca6bf00fd8400..979adf4588d7c66fc3c884691a047f6c8e2de80a 100644 --- a/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php +++ b/core/modules/views/src/Plugin/views/display_extender/DisplayExtenderPluginBase.php @@ -71,8 +71,7 @@ public function query() {} public function optionsSummary(&$categories, &$options) {} /** - * Static member function to list which sections are defaultable - * and what items each section contains. + * Gets a list of defaultable sections and the items they contain. */ public function defaultableSections(&$sections, $section = NULL) {} diff --git a/core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php b/core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php index f332e4b7bd179b7a41fda52533c7d192b233d9f0..d9997318e6e44858920bce814640459298cdb5f8 100644 --- a/core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php +++ b/core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php @@ -136,8 +136,7 @@ public function getEntity(ResultRow $values); public function getValue(ResultRow $values, $field = NULL); /** - * Determines if this field will be available as an option to group the result - * by in the style settings. + * Determines if this field can be grouped in the results. * * @return bool * TRUE if this field handler is groupable, otherwise FALSE. diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 77eec2fa132c239c460d34d32a838ccb75db4494..89dec8b702cd6a82d87b85d779031fc1ffc551e2 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -533,8 +533,7 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { } /** - * Default options form that provides the label widget that all fields - * should have. + * Default option form that provides label widget that all fields should have. */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); @@ -1399,8 +1398,7 @@ protected function renderTrimText($alter, $value) { } /** - * Render this field as a link, with the info from a fieldset set by - * the user. + * Render this field as a link, with the info from a fieldset set by the user. */ protected function renderAsLink($alter, $text, $tokens) { $options = [ diff --git a/core/modules/views/src/Plugin/views/filter/Combine.php b/core/modules/views/src/Plugin/views/filter/Combine.php index a39e3b0118698a5af0448169305b6bdaff5da861..bffce7a8962c2b61ff98c36dbb361ecc5d16a63a 100644 --- a/core/modules/views/src/Plugin/views/filter/Combine.php +++ b/core/modules/views/src/Plugin/views/filter/Combine.php @@ -128,10 +128,11 @@ public function validate() { } /** - * By default things like opEqual uses add_where, that doesn't support - * complex expressions, so override opEqual (and all operators below). + * {@inheritdoc} */ public function opEqual($expression) { + // By default, things like opEqual uses add_where, that doesn't support + // complex expressions, so override opEqual (and all operators below). $placeholder = $this->placeholder(); $operator = $this->getConditionOperator($this->operator()); $this->query->addWhereExpression($this->options['group'], "$expression $operator $placeholder", [$placeholder => $this->value]); diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index 924f3dbd414cc2387f92455908902599f1d8df1d..293efd7a464ce06efe6fa4ea5e19efc3dcc796bf 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -851,8 +851,10 @@ protected function buildGroupOptions() { } /** - * Build a form containing a group of operator | values to apply as a - * single filter. + * Builds a group form. + * + * The form contains a group of operator or values to apply as a single + * filter. */ public function groupForm(&$form, FormStateInterface $form_state) { if (!empty($this->options['group_info']['optional']) && !$this->multipleExposedInput()) { @@ -1274,8 +1276,7 @@ public function addGroupForm($form, FormStateInterface $form_state) { } /** - * Make some translations to a form item to make it more suitable to - * exposing. + * Make some translations to a form item to make it more suitable to exposing. */ protected function exposedTranslate(&$form, $type) { if (!isset($form['#type'])) { @@ -1339,8 +1340,10 @@ protected function prepareFilterSelectOptions(&$options) { } /** - * Tell the renderer about our exposed form. This only needs to be - * overridden for particularly complex forms. And maybe not even then. + * Tell the renderer about our exposed form. + * + * This only needs to be overridden for particularly complex forms. And maybe + * not even then. * * @return array|null * For standard exposed filters. An array with the following keys: @@ -1422,6 +1425,8 @@ public function convertExposedInput(&$input, $selected_group_id = NULL) { } /** + * Group multiple exposed input. + * * Returns the options available for a grouped filter that users checkboxes * as widget, and therefore has to be applied several times, one per * item selected. @@ -1434,6 +1439,8 @@ public function groupMultipleExposedInput(&$input) { } /** + * Multiple exposed input. + * * Returns TRUE if users can select multiple groups items of a * grouped exposed filter. */ diff --git a/core/modules/views/src/Plugin/views/filter/InOperator.php b/core/modules/views/src/Plugin/views/filter/InOperator.php index 3a8d5de6b22b4ed5ce942572607777cc84619eef..52c198ce05a8e02077e559c20dee9eb27f83761c 100644 --- a/core/modules/views/src/Plugin/views/filter/InOperator.php +++ b/core/modules/views/src/Plugin/views/filter/InOperator.php @@ -48,6 +48,8 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o } /** + * Gets the value options. + * * Child classes should be used to override this function and set the * 'value options', unless 'options callback' is defined as a valid function * or static public method to generate these values. @@ -105,6 +107,8 @@ protected function defineOptions() { } /** + * Gets the operators. + * * This kind of construct makes it relatively easy for a child class * to add or remove functionality by overriding this function and * adding/removing items from this array. diff --git a/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/core/modules/views/src/Plugin/views/filter/ManyToOne.php index 846f37b42fc523bd1cfb754b372f444beeab0ac8..5f326be154e8af4128f1478a80f05ea53fb9851a 100644 --- a/core/modules/views/src/Plugin/views/filter/ManyToOne.php +++ b/core/modules/views/src/Plugin/views/filter/ManyToOne.php @@ -114,8 +114,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { } /** - * Override ensureMyTable so we can control how this joins in. - * The operator actually has influence over joining. + * {@inheritdoc} */ public function ensureMyTable() { // Defer to helper if the operator specifies it. diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php index a4cc9eb76e3050e17f1efce43c72092c044a93d9..948acb675664988b65215bd09dca591be99191b6 100644 --- a/core/modules/views/src/Plugin/views/filter/StringFilter.php +++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php @@ -97,6 +97,8 @@ public function buildExposeForm(&$form, FormStateInterface $form_state) { } /** + * Get the operators. + * * This kind of construct makes it relatively easy for a child class * to add or remove functionality by overriding this function and * adding/removing items from this array. @@ -346,6 +348,9 @@ public function query() { } } + /** + * Adds a where clause for the operation, 'equals'. + */ public function opEqual($field) { $this->query->addWhere($this->options['group'], $field, $this->value, $this->operator()); } diff --git a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php index d02f67034417598829cf41ee2f144092df29bac4..f72cf11d3649f40dc1cbce2f557721c47b099306 100644 --- a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php @@ -122,8 +122,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) {} public function submitOptionsForm(&$form, FormStateInterface $form_state) {} /** - * Return a string to display as the clickable title for the - * pager plugin. + * Returns a string to display as the clickable title for the pager plugin. */ public function summaryTitle() { return $this->t('Unknown'); @@ -148,8 +147,9 @@ public function useCountQuery() { } /** - * Execute the count query, which will be done just prior to the query - * itself being executed. + * Executes the count query. + * + * This will be done just prior to the query itself being executed. */ public function executeCountQuery(&$count_query) { $this->total_items = $count_query->execute()->fetchField(); @@ -163,6 +163,8 @@ public function executeCountQuery(&$count_query) { } /** + * Updates the pager information. + * * If there are pagers that need global values set, this method can * be used to set them. It will be called after the query is run. */ diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php index 6c49b1d011c8ec4525e3c9ef8572460106facd43..1e0740fc9d25def71c25e415461c045b2658b80f 100644 --- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php +++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php @@ -60,8 +60,7 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency protected $groupOperator; /** - * Generate a query and a countquery from all of the information supplied - * to the object. + * Generate a query and a countquery from all of the information supplied. * * @param $get_count * Provide a countquery if this is true, otherwise provide a normal query. @@ -85,8 +84,7 @@ public function alter(ViewExecutable $view) {} public function build(ViewExecutable $view) {} /** - * Executes the query and fills the associated view object with according - * values. + * Executes query and fills associated view object with according values. * * Values to set: $view->result, $view->total_rows, $view->execute_time, * $view->pager['current_page']. diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 035df8b59380d383b2daea19f0e729de854a526f..47f229f9530d0010df661790df3fde3aba114209 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -344,6 +344,8 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { } /** + * Adds a relationship to the query. + * * A relationship is an alternative endpoint to a series of table * joins. Relationships must be aliases of the primary table and * they must join either to the primary table or to a pre-existing @@ -572,9 +574,11 @@ protected function markTable($table, $relationship, $alias) { } /** - * Ensure a table exists in the queue; if it already exists it won't - * do anything, but if it doesn't it will add the table queue. It will ensure - * a path leads back to the relationship table. + * Ensures a table exists in the queue. + * + * If it already exists it won't do anything, but if it doesn't it will add + * the table queue. It will ensure a path leads back to the relationship + * table. * * @param $table * The unaliased name of the table to ensure. @@ -662,11 +666,11 @@ public function ensureTable($table, $relationship = NULL, JoinPluginBase $join = } /** - * Make sure that the specified table can be properly linked to the primary - * table in the JOINs. This function uses recursion. If the tables - * needed to complete the path back to the primary table are not in the - * query they will be added, but additional copies will NOT be added - * if the table is already there. + * Ensures the given table can be linked to the primary table in the JOINs. + * + * This function uses recursion. If the tables needed to complete the path + * back to the primary table are not in the query they will be added, but + * additional copies will NOT be added if the table is already there. */ protected function ensurePath($table, $relationship = NULL, $join = NULL, $traced = [], $add = []) { if (!isset($relationship)) { @@ -717,8 +721,10 @@ protected function ensurePath($table, $relationship = NULL, $join = NULL, $trace } /** - * Fix a join to adhere to the proper relationship; the left table can vary - * based upon what relationship items are joined in on. + * Fixes a join to adhere to the proper relationship. + * + * The left table can vary based upon what relationship items are joined in + * on. */ protected function adjustJoin($join, $relationship) { if (!empty($join->adjusted)) { @@ -803,8 +809,9 @@ public function getTableInfo($table) { } /** - * Add a field to the query table, possibly with an alias. This will - * automatically call ensureTable to make sure the required table + * Adds a field to the query table, possibly with an alias. + * + * This will automatically call ensureTable to make sure the required table * exists, *unless* $table is unset. * * @param $table @@ -879,17 +886,20 @@ public function addField($table, $field, $alias = '', $params = []) { } /** - * Remove all fields that may have been added; primarily used for summary mode - * where we're changing the query because we didn't get data we needed. + * Removes all fields that may have been added. + * + * Primarily used for summary mode where we're changing the query because + * we didn't get data we needed. */ public function clearFields() { $this->fields = []; } /** - * Add a simple WHERE clause to the query. The caller is responsible for - * ensuring that all fields are fully qualified (TABLE.FIELD) and that - * the table already exists in the query. + * Adds a simple WHERE clause to the query. + * + * The caller is responsible for ensuring that all fields are fully qualified + * (TABLE.FIELD) and that the table already exists in the query. * * The $field, $value and $operator arguments can also be passed in with a * single DatabaseCondition object, like this: @@ -940,7 +950,7 @@ public function addWhere($group, $field, $value = NULL, $operator = NULL) { } /** - * Add a complex WHERE clause to the query. + * Adds a complex WHERE clause to the query. * * The caller is responsible for ensuring that all fields are fully qualified * (TABLE.FIELD) and that the table already exists in the query. @@ -1062,9 +1072,10 @@ public function addOrderBy($table, $field = NULL, $order = 'ASC', $alias = '', $ } /** - * Add a simple GROUP BY clause to the query. The caller is responsible - * for ensuring that the fields are fully qualified and the table is properly - * added. + * Add a simple GROUP BY clause to the query. + * + * The caller is responsible for ensuring that the fields are fully qualified + * and the table is properly added. */ public function addGroupBy($clause) { // Only add it if it's not already in there. @@ -1282,8 +1293,7 @@ public function getConnection() { } /** - * Generate a query and a countquery from all of the information supplied - * to the object. + * Generates a query and a countquery from all of the information supplied. * * @param $get_count * Provide a countquery if this is true, otherwise provide a normal query. @@ -1461,8 +1471,7 @@ public function build(ViewExecutable $view) { } /** - * Executes the query and fills the associated view object with according - * values. + * Executes the query and fills associated view object with according values. * * Values to set: $view->result, $view->total_rows, $view->execute_time, * $view->current_page. diff --git a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php index 05d675509b230b3d7f1e4d37098dab469464ccc1..8774b81cef1414671d32f41e041f1162dd15bb64 100644 --- a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php +++ b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php @@ -23,6 +23,8 @@ */ /** + * Relationship plugin base. + * * Simple relationship handler that allows a new version of the primary table * to be linked in. * diff --git a/core/modules/views/src/Plugin/views/row/RowPluginBase.php b/core/modules/views/src/Plugin/views/row/RowPluginBase.php index 06772d356b03b2f78682d0c3f82dcbb18494a652..b3949de0702c4f10a025baee7a48579b1c282f48 100644 --- a/core/modules/views/src/Plugin/views/row/RowPluginBase.php +++ b/core/modules/views/src/Plugin/views/row/RowPluginBase.php @@ -165,8 +165,10 @@ public function query() { public function preRender($result) {} /** - * Render a row object. This usually passes through to a theme template - * of some form, but not always. + * Renders a row object. + * + * This usually passes through to a theme template of some form, but not + * always. * * @param object $row * A single row of the query result, so an element of $view->result. diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php index 1831fdb672bce771ca022f566515dd3156ad325d..871b7393bc88f7181fc7f54ee4c4dc9ec80fe555 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -246,8 +246,7 @@ public function tokenizeValue($value, $row_index) { } /** - * Should the output of the style plugin be rendered even if it's an empty - * view. + * Determines if the style plugin is rendered even if the view is empty. */ public function evenEmpty() { return !empty($this->definition['even empty']); @@ -397,6 +396,8 @@ public function wizardSubmit(&$form, FormStateInterface $form_state, WizardInter } /** + * Determines if the style handler should interfere with sorts. + * * Called by the view builder to see if this style handler wants to * interfere with the sorts. If so it should build; if it returns * any non-TRUE value, normal sorting will NOT be added to the query. @@ -406,6 +407,8 @@ public function buildSort() { } /** + * Allows the view builder to build a second set of sorts. + * * Called by the view builder to let the style build a second set of * sorts that will come after any other sorts in the view. */ diff --git a/core/modules/views/src/Plugin/views/style/Table.php b/core/modules/views/src/Plugin/views/style/Table.php index a933104bc256fdc9ba5dd996a7724cec4a256602..10f7db58c7b23875114d4b9b5e9800addce3fea7 100644 --- a/core/modules/views/src/Plugin/views/style/Table.php +++ b/core/modules/views/src/Plugin/views/style/Table.php @@ -140,6 +140,8 @@ public function buildSortPost() { } /** + * Sanitizes the columns. + * * Normalize a list of columns based upon the fields that are * available. This compares the fields stored in the style handler * to the list of fields actually in the view, removing fields that diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php index b121ed3739a46f93cdb50e15b19a181457cf129c..2373ebbc219bee0ddce78f8e8328a0ddb10aabc9 100644 --- a/core/modules/views/src/Views.php +++ b/core/modules/views/src/Views.php @@ -188,6 +188,8 @@ public static function getEnabledDisplayExtenders() { } /** + * Gets view and display IDs for a given setting in display plugin settings. + * * Return a list of all view IDs and display IDs that have a particular * setting in their display's plugin settings. * @@ -276,8 +278,9 @@ public static function getDisabledViews() { } /** - * Returns an array of view as options array, that can be used by select, - * checkboxes and radios as #options. + * Returns an array of view as options array. + * + * This array can be used by select, checkboxes and radios as #options. * * @param bool $views_only * If TRUE, only return views, not displays. @@ -409,8 +412,9 @@ public static function pluginList() { } /** - * Provide a list of views handler types used in a view, with some information - * about them. + * Provide a list of views handler types used in a view. + * + * Also provides some information about them. * * @return array * An array of associative arrays containing: diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index a95ce640626d1fc4e2d18e609160c5a041d5a2b9..58eafbd55ff0e51d4745965102bb98dc6efdb72f 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -277,9 +277,10 @@ public function standardCancel($form, FormStateInterface $form_state) { } /** - * Provide a standard set of Apply/Cancel/OK buttons for the forms. Also provide - * a hidden op operator because the forms plugin doesn't seem to properly - * provide which button was clicked. + * Provides a standard set of Apply/Cancel/OK buttons for the forms. + * + * This will also provide a hidden op operator because the forms plugin + * doesn't seem to properly provide which button was clicked. * * TODO: Is the hidden op operator still here somewhere, or is that part of the * docblock outdated? @@ -381,8 +382,9 @@ public function getOverrideValues($form, FormStateInterface $form_state) { } /** - * Add another form to the stack; clicking 'apply' will go to this form - * rather than closing the ajax popup. + * Adds another form to the stack. + * + * Clicking 'apply' will go to this form rather than closing the ajax popup. */ public function addFormToStack($key, $display_id, $type, $id = NULL, $top = FALSE, $rebuild_keys = FALSE) { // Reset the cache of IDs. Drupal rather aggressively prevents ID