You are here

protected function LingotekManagementFormHelperTrait::getItemsPerPage in Lingotek Translation 8

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

Return value

int|mixed

1 call to LingotekManagementFormHelperTrait::getItemsPerPage()
LingotekManagementForm::buildForm in src/Form/LingotekManagementForm.php
Form constructor.

File

src/Helpers/LingotekManagementFormHelperTrait.php, line 25
Contains \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait.

Class

LingotekManagementFormHelperTrait
Useful methods for management forms.

Namespace

Drupal\lingotek\Helpers

Code

protected function getItemsPerPage() {
  $items_per_page_temp_store = $this->tempStoreFactory
    ->get('lingotek.management.items_per_page');
  $items_per_page = $items_per_page_temp_store
    ->get('limit');
  if (!$items_per_page) {
    $items_per_page = 10;
    return $items_per_page;
  }
  return $items_per_page;
}