You are here

protected function LingotekManagementForm::getPager in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8.2 src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  2. 4.0.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  3. 3.0.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  4. 3.1.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  5. 3.3.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  6. 3.4.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  7. 3.5.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  8. 3.6.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  9. 3.7.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()
  10. 3.8.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getPager()

Gets the pager.

Return value

array A render array.

Overrides LingotekManagementFormBase::getPager

File

src/Form/LingotekManagementForm.php, line 402

Class

LingotekManagementForm
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

protected function getPager() {
  $items_per_page = $this
    ->getItemsPerPage();
  return [
    '#type' => 'select',
    '#title' => $this
      ->t('Results per page:'),
    '#options' => [
      10 => 10,
      25 => 25,
      50 => 50,
      100 => 100,
      250 => 250,
      500 => 500,
    ],
    '#default_value' => $items_per_page,
    '#weight' => 60,
    '#ajax' => [
      'callback' => [
        $this,
        'itemsPerPageCallback',
      ],
      'event' => 'change',
    ],
  ];
}