class Full

The plugin to handle full pager.

Plugin annotation


@Plugin(
  id = "full",
  title = @Translation("Paged output, full pager"),
  short_title = @Translation("Full"),
  help = @Translation("Paged output, full Drupal style")
)

Hierarchy

Expanded class hierarchy of Full

Related topics

3 string references to 'Full'
entity.view_mode.custom_block.full.yml in drupal/core/modules/block/custom_block/config/entity.view_mode.custom_block.full.yml
drupal/core/modules/block/custom_block/config/entity.view_mode.custom_block.full.yml
entity.view_mode.entity_test_render.full.yml in drupal/core/modules/system/tests/modules/entity_test/config/entity.view_mode.entity_test_render.full.yml
drupal/core/modules/system/tests/modules/entity_test/config/entity.view_mode.entity_test_render.full.yml
PagerTest::testStorePagerSettings in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php
Pagers was sometimes not stored.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php, line 25
Definition of Drupal\views\Plugin\views\pager\Full.

Namespace

Drupal\views\Plugin\views\pager
View source
class Full extends SqlBase {

  /**
   * Overrides \Drupal\views\Plugin\views\SqlBase::defineOptions().
   */
  protected function defineOptions() {
    $options = parent::defineOptions();

    // Use the same default quantity that core uses by default.
    $options['quantity'] = array(
      'default' => 9,
    );
    $options['tags']['contains']['first'] = array(
      'default' => '« first',
      'translatable' => TRUE,
    );
    $options['tags']['contains']['last'] = array(
      'default' => 'last »',
      'translatable' => TRUE,
    );
    return $options;
  }

  /**
   * Overrides \Drupal\views\Plugin\views\SqlBase::buildOptionsForm().
   */
  public function buildOptionsForm(&$form, &$form_state) {
    parent::buildOptionsForm($form, $form_state);
    $form['quantity'] = array(
      '#type' => 'number',
      '#title' => t('Number of pager links visible'),
      '#description' => t('Specify the number of links to pages to display in the pager.'),
      '#default_value' => $this->options['quantity'],
    );
    $form['tags']['first'] = array(
      '#type' => 'textfield',
      '#title' => t('First page link text'),
      '#default_value' => $this->options['tags']['first'],
      '#weight' => -10,
    );
    $form['tags']['last'] = array(
      '#type' => 'textfield',
      '#title' => t('Last page link text'),
      '#default_value' => $this->options['tags']['last'],
      '#weight' => 10,
    );
  }

  /**
   * Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::summaryTitle().
   */
  public function summaryTitle() {
    if (!empty($this->options['offset'])) {
      return format_plural($this->options['items_per_page'], '@count item, skip @skip', 'Paged, @count items, skip @skip', array(
        '@count' => $this->options['items_per_page'],
        '@skip' => $this->options['offset'],
      ));
    }
    return format_plural($this->options['items_per_page'], '@count item', 'Paged, @count items', array(
      '@count' => $this->options['items_per_page'],
    ));
  }

  /**
   * Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render().
   */
  function render($input) {
    $pager_theme = views_theme_functions('pager', $this->view, $this->view->display_handler->display);

    // The 0, 1, 3, 4 index are correct. See theme_pager documentation.
    $tags = array(
      0 => $this->options['tags']['first'],
      1 => $this->options['tags']['previous'],
      3 => $this->options['tags']['next'],
      4 => $this->options['tags']['last'],
    );
    $output = theme($pager_theme, array(
      'tags' => $tags,
      'element' => $this->options['id'],
      'parameters' => $input,
      'quantity' => $this->options['quantity'],
    ));
    return $output;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerFactoryPluginBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 11
Full::buildOptionsForm public function Overrides \Drupal\views\Plugin\views\SqlBase::buildOptionsForm(). Overrides SqlBase::buildOptionsForm
Full::defineOptions protected function Overrides \Drupal\views\Plugin\views\SqlBase::defineOptions(). Overrides SqlBase::defineOptions
Full::render function Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render(). Overrides PagerPluginBase::render
Full::summaryTitle public function Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::summaryTitle(). Overrides PagerPluginBase::summaryTitle
PagerPluginBase::$current_page property
PagerPluginBase::$total_items property
PagerPluginBase::$usesOptions protected property Overrides Drupal\views\Plugin\Plugin::$usesOptions. Overrides PluginBase::$usesOptions
PagerPluginBase::executeCountQuery public function Execute the count query, which will be done just prior to the query itself being executed. 1
PagerPluginBase::exposedFormSubmit public function
PagerPluginBase::getCurrentPage public function Get the current page.
PagerPluginBase::getItemsPerPage public function Get how many items per page this pager will display. 1
PagerPluginBase::getOffset public function Get the page offset, or how many items to skip.
PagerPluginBase::getPagerId public function Get the pager id, if it exists
PagerPluginBase::getTotalItems public function Get the total number of items.
PagerPluginBase::hasMoreRecords public function Determine if there are more records available.
PagerPluginBase::postExecute public function Perform any needed actions just after the query executing. 2
PagerPluginBase::preExecute public function Perform any needed actions just prior to the query executing.
PagerPluginBase::pre_render function Perform any needed actions just before rendering.
PagerPluginBase::setItemsPerPage public function Set how many items per page this pager will display.
PagerPluginBase::setOffset public function Set the page offset, or how many items to skip.
PagerPluginBase::submitOptionsForm public function Provide the default form form for submitting options Overrides PluginBase::submitOptionsForm
PagerPluginBase::useCountQuery public function Determine if a pager needs a count query. 3
PagerPluginBase::usePager public function Determine if this pager actually uses a pager. 2
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$definition public property Plugins's definition
PluginBase::$displayHandler public property The display object this plugin is for.
PluginBase::$options public property Options for this plugin will be held here.
PluginBase::$pluginDefinition protected property The plugin implementation definition.
PluginBase::$pluginId protected property The plugin_id.
PluginBase::$view public property The top object of a view. 1
PluginBase::destroy public function Clears a plugin. 2
PluginBase::getAvailableGlobalTokens public function Returns an array of available token replacements.
PluginBase::getPluginDefinition public function Returns the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition
PluginBase::getPluginId public function Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::globalTokenForm public function Adds elements for available core tokens to a form.
PluginBase::globalTokenReplace public function Returns a string with any core tokens replaced.
PluginBase::init public function Initialize the plugin. 8
PluginBase::pluginTitle public function Return the human readable name of the display.
PluginBase::setOptionDefaults protected function Fills up the options of the plugin with defaults.
PluginBase::themeFunctions public function Provide a full list of possible theme templates used by this style. 1
PluginBase::unpackOptions public function Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away.
PluginBase::usesOptions public function Returns the usesOptions property. 8
PluginBase::validate public function Validate that the plugin is correct and can be saved. 4
PluginBase::__construct public function Constructs a Plugin object. Overrides PluginBase::__construct
SqlBase::exposedFormAlter public function Overrides PagerPluginBase::exposedFormAlter
SqlBase::exposedFormValidate public function Overrides PagerPluginBase::exposedFormValidate
SqlBase::getPagerTotal public function
SqlBase::isOffsetExposed protected function Overrides PagerPluginBase::isOffsetExposed
SqlBase::itemsPerPageExposed protected function Overrides PagerPluginBase::itemsPerPageExposed
SqlBase::query public function Modify the query for paging Overrides PagerPluginBase::query 1
SqlBase::setCurrentPage public function Set the current page. Overrides PagerPluginBase::setCurrentPage
SqlBase::updatePageInfo public function Update global paging info. Overrides PagerPluginBase::updatePageInfo
SqlBase::usesExposed public function Overrides PagerPluginBase::usesExposed
SqlBase::validateOptionsForm public function Provide the default form form for validating options Overrides PagerPluginBase::validateOptionsForm