trait LingotekManagementFormHelperTrait in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 4.0.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.0.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.1.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.2.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.3.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.4.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.5.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.6.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.7.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
- 3.8.x src/Helpers/LingotekManagementFormHelperTrait.php \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
Useful methods for management forms.
Hierarchy
- trait \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait
2 files declare their use of LingotekManagementFormHelperTrait
- LingotekManagementForm.php in src/
Form/ LingotekManagementForm.php - Contains \Drupal\Lingotek\Form\LingotekManagementForm.
- LingotekMetadataEditForm.php in src/
Form/ LingotekMetadataEditForm.php
File
- src/
Helpers/ LingotekManagementFormHelperTrait.php, line 13 - Contains \Drupal\lingotek\Helpers\LingotekManagementFormHelperTrait.
Namespace
Drupal\lingotek\HelpersView source
trait LingotekManagementFormHelperTrait {
/**
* The tempstore factory.
*
* @var \Drupal\user\PrivateTempStoreFactory
*/
protected $tempStoreFactory;
/**
* @return int|mixed
*/
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;
}
protected function setItemsPerPage($count) {
$items_per_page_temp_store = $this->tempStoreFactory
->get('lingotek.management.items_per_page');
$items_per_page_temp_store
->set('limit', $count);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LingotekManagementFormHelperTrait:: |
protected | property | The tempstore factory. | |
LingotekManagementFormHelperTrait:: |
protected | function | ||
LingotekManagementFormHelperTrait:: |
protected | function |