mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 23:54:08 +01:00
* [DEV] Items controllers refactoring. * [DEV] Date picker improvements: language and timezone * [DEV] Improved internal session user's data handling. * [DEV] Improved internal account data handling. * [DEV] Fixed account updating. * [DEV] Fixed account password view.
56 lines
1.3 KiB
PHP
56 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: rdb
|
|
* Date: 24/11/15
|
|
* Time: 14:14
|
|
*/
|
|
|
|
namespace SP\Controller;
|
|
|
|
defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'));
|
|
|
|
use SP\Core\SessionUtil;
|
|
use SP\Core\Template;
|
|
use SP\DataModel\ItemSearchData;
|
|
use SP\Html\DataGrid\DataGridPagerInterface;
|
|
use SP\Util\Checks;
|
|
|
|
/**
|
|
* Class GridItemsSearch para construcción de clases que usen el Grid de búsqueda de registros
|
|
*
|
|
* @package SP\Controller
|
|
*/
|
|
abstract class GridItemsSearchController extends ControllerBase
|
|
{
|
|
/**
|
|
* @var Grids
|
|
*/
|
|
protected $grids;
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param $template Template con instancia de plantilla
|
|
*/
|
|
public function __construct(Template $template = null)
|
|
{
|
|
parent::__construct($template);
|
|
|
|
$this->grids = new Grids();
|
|
$this->grids->setQueryTimeStart(microtime());
|
|
}
|
|
|
|
/**
|
|
* Actualizar los datos del paginador
|
|
*
|
|
* @param DataGridPagerInterface $Pager
|
|
* @param ItemSearchData $SearchData
|
|
*/
|
|
protected function updatePager(DataGridPagerInterface $Pager, ItemSearchData $SearchData)
|
|
{
|
|
$Pager->setLimitStart($SearchData->getLimitStart());
|
|
$Pager->setLimitCount($SearchData->getLimitCount());
|
|
$Pager->setFilterOn($SearchData->getSeachString() !== '');
|
|
}
|
|
} |