Esempio n. 1
0
 /**
  * @see GridFeature::setGridDataElements()
  * @param $args array
  */
 function setGridDataElements($args)
 {
     $grid =& $args['grid'];
     $data =& $args['data'];
     if (is_array($data)) {
         import('lib.pkp.classes.core.ArrayItemIterator');
         $request = Application::getRequest();
         $rangeInfo = $grid->getGridRangeInfo($request, $grid->getId());
         $itemIterator = new ArrayItemIterator($data, $rangeInfo->getPage(), $rangeInfo->getCount());
         $this->_itemIterator = $itemIterator;
         $data = $itemIterator->toArray();
     } elseif (is_a($data, 'ItemIterator')) {
         $this->_itemIterator = $data;
     }
 }