class Full
Same name and namespace in other branches
- 11.x core/modules/views/src/Plugin/views/pager/Full.php \Drupal\views\Plugin\views\pager\Full
The plugin to handle full pager.
Plugin annotation
@ViewsPager(
id = "full",
title = @Translation("Paged output, full pager"),
short_title = @Translation("Full"),
help = @Translation("Paged output, full Drupal style"),
theme = "pager",
register_theme = FALSE
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views\Plugin\views\pager\PagerPluginBase implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\pager\SqlBase extends \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface implements \Drupal\views\Plugin\views\pager\PagerPluginBase
- class \Drupal\views\Plugin\views\pager\Full implements \Drupal\views\Plugin\views\pager\SqlBase
- class \Drupal\views\Plugin\views\pager\SqlBase extends \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface implements \Drupal\views\Plugin\views\pager\PagerPluginBase
- class \Drupal\views\Plugin\views\pager\PagerPluginBase implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of Full
Related topics
233 string references to 'Full'
- AreaDisplayLinkTest::testAreaDisplayLink in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaDisplayLinkTest.php - Tests the views area display_link handler.
- AreaEntityTest::doTestRender in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaEntityTest.php - Tests rendering the entity area handler.
- block.block.umami_banner_home.yml in core/
profiles/ demo_umami/ config/ optional/ block.block.umami_banner_home.yml - core/profiles/demo_umami/config/optional/block.block.umami_banner_home.yml
- block.block.umami_banner_recipes.yml in core/
profiles/ demo_umami/ config/ optional/ block.block.umami_banner_recipes.yml - core/profiles/demo_umami/config/optional/block.block.umami_banner_recipes.yml
- block.block.umami_disclaimer.yml in core/
profiles/ demo_umami/ config/ optional/ block.block.umami_disclaimer.yml - core/profiles/demo_umami/config/optional/block.block.umami_disclaimer.yml
File
-
core/
modules/ views/ src/ Plugin/ views/ pager/ Full.php, line 21
Namespace
Drupal\views\Plugin\views\pagerView source
class Full extends SqlBase {
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
// Use the same default quantity that core uses by default.
$options['quantity'] = [
'default' => 9,
];
$options['tags']['contains']['first'] = [
'default' => $this->t('« First'),
];
$options['tags']['contains']['last'] = [
'default' => $this->t('Last »'),
];
return $options;
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['quantity'] = [
'#type' => 'number',
'#min' => 0,
'#title' => $this->t('Number of pager links visible'),
'#description' => $this->t('Specify the number of links to pages to display in the pager.'),
'#default_value' => $this->options['quantity'],
];
$form['tags']['first'] = [
'#type' => 'textfield',
'#title' => $this->t('First page link text'),
'#default_value' => $this->options['tags']['first'],
'#weight' => -10,
];
$form['tags']['last'] = [
'#type' => 'textfield',
'#title' => $this->t('Last page link text'),
'#default_value' => $this->options['tags']['last'],
'#weight' => 10,
];
}
/**
* {@inheritdoc}
*/
public function summaryTitle() {
if (!empty($this->options['offset'])) {
return $this->formatPlural($this->options['items_per_page'], '@count item, skip @skip', 'Paged, @count items, skip @skip', [
'@count' => $this->options['items_per_page'],
'@skip' => $this->options['offset'],
]);
}
return $this->formatPlural($this->options['items_per_page'], '@count item', 'Paged, @count items', [
'@count' => $this->options['items_per_page'],
]);
}
/**
* {@inheritdoc}
*/
public function render($input) {
// The 0, 1, 3, 4 indexes are correct. See the template_preprocess_pager()
// documentation.
$tags = [
0 => $this->options['tags']['first'],
1 => $this->options['tags']['previous'],
3 => $this->options['tags']['next'],
4 => $this->options['tags']['last'],
];
return [
'#theme' => $this->themeFunctions(),
'#tags' => $tags,
'#element' => $this->options['id'],
'#parameters' => $input,
'#quantity' => $this->options['quantity'],
'#route_name' => !empty($this->view->live_preview) ? '<current>' : '<none>',
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.