示例#1
0
 /**
  * @see GridFeature::setOptions()
  * @param $request PKPRequest
  * @param $grid Grid
  */
 function setOptions($request, $grid)
 {
     // Get the default items per page setting value.
     $rangeInfo = PKPHandler::getRangeInfo($request, $grid->getId());
     $defaultItemsPerPage = $rangeInfo->getCount();
     // Check for a component level items per page setting.
     $componentItemsPerPage = $request->getUserVar($this->_getItemsPerPageParamName($grid->getId()));
     if ($componentItemsPerPage) {
         $currentItemsPerPage = $componentItemsPerPage;
     } else {
         $currentItemsPerPage = $defaultItemsPerPage;
     }
     $iterator = $this->getItemIterator();
     $options = array('itemsPerPageParamName' => $this->_getItemsPerPageParamName($grid->getId()), 'defaultItemsPerPage' => $defaultItemsPerPage, 'currentItemsPerPage' => $currentItemsPerPage, 'itemsTotal' => $iterator->getCount(), 'pageParamName' => PKPHandler::getPageParamName($grid->getId()), 'currentPage' => $iterator->getPage());
     $this->addOptions($options);
     parent::setOptions($request, $grid);
 }
 /**
  * Constructor.
  */
 function GridCategoryAccordionFeature()
 {
     parent::GridFeature('categoryAccordion');
 }
 /**
  * Constructor.
  */
 function SelectableItemsFeature()
 {
     parent::GridFeature('selectableItems');
 }
示例#4
0
 /**
  * @see GridFeature::setOptions()
  */
 function setOptions(&$request, &$grid)
 {
     parent::setOptions($request, $grid);
     $router =& $request->getRouter();
     $this->addOptions(array('saveItemsSequenceUrl' => $router->url($request, null, null, 'saveSequence', null, $grid->getRequestArgs())));
 }
 /**
  * @copydoc GridFeature::GridFeature()
  * Constructor.
  */
 function CollapsibleGridFeature($id = 'collapsible')
 {
     parent::GridFeature($id);
 }
 /**
  * @copydoc GridFeature::GridFeature()
  * Constructor.
  */
 function __construct($id = 'collapsible')
 {
     parent::__construct($id);
 }
 /**
  * Constructor.
  */
 function __construct()
 {
     parent::__construct('selectableItems');
 }
 /**
  * Constructor.
  */
 function __construct()
 {
     parent::__construct('categoryAccordion');
 }