function hook_views_analyze(\Drupal\views\ViewExecutable
$view) { $messages =
[];
if ($view->display_handler->options
['pager'
]['type'
] == 'none'
) { $messages[] = Drupal\views\Analyzer::
formatMessage(t('This view has no pager. This could cause performance issues when the view contains many items.'
), 'warning'
);
} return $messages;
}/**
* Describe data tables and fields (or the equivalent) to Views.
*
* The table and fields are processed in Views using various plugins. See
* the @link views_plugins Views plugins topic @endlink for more information.
*
* To provide views data for an entity, instead of implementing this hook,
* create a class implementing \Drupal\views\EntityViewsDataInterface and
* reference this in the "handlers.views_data" annotation in the entity class.
* The return value of the getViewsData() method on the interface is the same as
* this hook, and base class in \Drupal\views\EntityViewsData will take care of
* adding the basic Views tables and fields for your entity. See the
* @link entity_api Entity API topic @endlink for more information about
* entities.
*
* The data described with this hook is fetched and retrieved by
* \Drupal\views\Views::viewsData()->get().
*
* @return array
* An associative array describing the structure of database tables and fields
* (and their equivalents) provided for use in Views. At the outermost level,
* the keys are the names used internally by Views for the tables (usually the
* actual table name). Each table's array describes the table itself, how to
* join to other tables, and the fields that are part of the table. The sample
* function body provides documentation of the details.
*
* @see hook_views_data_alter()
*/