function SqlBase::__construct
Constructs a SqlBase object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Pager\PagerManagerInterface $pager_manager: The pager manager.
\Drupal\Core\Pager\PagerParameters|null $pager_parameters: The pager parameters.
Overrides PluginBase::__construct
File
-
core/
modules/ views/ src/ Plugin/ views/ pager/ SqlBase.php, line 46
Class
- SqlBase
- A common base class for sql based pager.
Namespace
Drupal\views\Plugin\views\pagerCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, PagerManagerInterface $pager_manager = NULL, PagerParameters $pager_parameters = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
if (!$pager_manager) {
@trigger_error('Calling ' . __METHOD__ . ' without the $pager_manager argument is deprecated in drupal:8.8.0 and is required in drupal:9.0.0. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
$pager_manager = \Drupal::service('pager.manager');
}
$this->pagerManager = $pager_manager;
if (!$pager_parameters) {
@trigger_error('Calling ' . __METHOD__ . ' without the $pager_parameters argument is deprecated in drupal:8.8.0 and is required in drupal:9.0.0. See https://www.drupal.org/node/2779457', E_USER_DEPRECATED);
$pager_parameters = \Drupal::service('pager.parameters');
}
$this->pagerParameters = $pager_parameters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.