Create a Pagination with PHP
Example of a pager (pagination) on php:
function showpager($currentIndex = 0, $buttons = 5, $totalPages = 50) {
$currentPage = $lowerLimit = $upperLimit = min($currentIndex, $totalPages);
//Search boundaries
function showpager($currentIndex = 0, $buttons = 5, $totalPages = 50) {
$currentPage = $lowerLimit = $upperLimit = min($currentIndex, $totalPages);
//Search boundaries
Note : On drupal the best practice is use drupal behaviors but not JS or Jquery codes such as:
<button onclick='myFunction()'>Click</button>
keyvalue.expirable service allow to save Key / Value variable in the database.
Example:
// Save without date limit.\Drupal::service('keyvalue.expirable')->get('my_module')->set('my_var', 123);
Webmin and Virtualmin Change IP access control from shell terminal.
Edit file: /etc/webmin/miniserv.conf
vim /etc/webmin/miniserv.conf
Change:
allow=OLD_IP to New IP
Example:
allow=123.214.123.123 85.25.65.45 45.65.85.36
Drush allow to download and install drupal core, drupal modules and drupal themes.
Note : It is recommended to use composer to manage drupal 8, modules and themes.