Exemplo n.º 1
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $ocID = $this->data['ocIDSearchField'];
     if ($ocID > 0) {
         $list->filterByOriginalPageID($ocID);
     }
 }
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $template = \PageTemplate::getByID($this->data['pTemplateID']);
     if (is_object($template)) {
         $list->filterByPageTemplate($template);
     }
 }
Exemplo n.º 3
0
 public function __construct(Set $columns, ItemList $il, $url, $fields = array())
 {
     $this->listColumns = $columns;
     $this->list = $il;
     $this->baseURL = $url;
     $this->fields = $fields;
     $this->pagination = $il->getPagination();
 }
Exemplo n.º 4
0
 /**
  * @param UserList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     if ($this->data['active'] === '0') {
         $list->filterByIsActive(0);
     } elseif ($this->data['active'] === '1') {
         $list->filterByIsActive(1);
     }
 }
 public function __construct(ItemList $itemList)
 {
     $itemList->getQueryObject()->setMaxResults($this->maxResultsToProcessAtOnce);
     $results = $itemList->getResults();
     $adapter = new ArrayAdapter($results);
     $this->list = $itemList;
     return Pagerfanta::__construct($adapter);
 }
 /**
  * @param ItemList $list
  */
 public function filterList(ItemList $list)
 {
     if (isset($this->data['versionToRetrieve']) && $this->data['versionToRetrieve']) {
         $versionToRetrieve = $this->data['versionToRetrieve'];
     } else {
         $versionToRetrieve = PageList::PAGE_VERSION_ACTIVE;
     }
     $list->setPageVersionToRetrieve($versionToRetrieve);
 }
Exemplo n.º 7
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $owner = $this->data['owner'];
     $ui = \UserInfo::getByUserName($owner);
     if (is_object($ui)) {
         $list->filterByUserID($ui->getUserID());
     } else {
         $list->filterByUserID(-1);
     }
 }
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $symbol = '=';
     if ($this->data['cChildrenSelect'] == 'gt') {
         $symbol = '>';
     } elseif ($this->data['cChildrenSelect'] == 'lt') {
         $symbol = '<';
     }
     $list->filterByNumberOfChildren($this->data['cChildren'], $symbol);
 }
Exemplo n.º 9
0
 /**
  * @param PageList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     if ($this->data['cParentIDSearchField'] > 0) {
         if ($this->data['cParentAll'] == 1) {
             $pc = \Page::getByID($this->data['cParentIDSearchField']);
             $cPath = $pc->getCollectionPath();
             $list->filterByPath($cPath);
         } else {
             $list->filterByParentID($this->data['cParentIDSearchField']);
         }
     }
 }
Exemplo n.º 10
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $ids = $this->data['fsID'];
     if (is_array($ids)) {
         foreach ($ids as $fsID) {
             $set = Set::getByID($fsID);
             if (is_object($set)) {
                 $list->filterBySet($set);
             }
         }
     }
 }
Exemplo n.º 11
0
 public function getCurrentPageResults()
 {
     $this->list->debugStart();
     $results = parent::getCurrentPageResults();
     $this->list->debugStop();
     $return = array();
     foreach ($results as $result) {
         $r = $this->list->getResult($result);
         if ($r != null) {
             $return[] = $r;
         }
     }
     return $return;
 }
Exemplo n.º 12
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $wdt = \Core::make('helper/form/date_time');
     /* @var $wdt \Concrete\Core\Form\Service\Widget\DateTime */
     $dateFrom = $wdt->translate('date_public_from', $this->data);
     if ($dateFrom) {
         $list->filterByPublicDate($dateFrom, '>=');
     }
     $dateTo = $wdt->translate('date_public_to', $this->data);
     if ($dateTo) {
         if (preg_match('/^(.+\\d+:\\d+):00$/', $dateTo, $m)) {
             $dateTo = $m[1] . ':59';
         }
         $list->filterByPublicDate($dateTo, '<=');
     }
 }
Exemplo n.º 13
0
 /**
  * @param UserList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $gsID = $this->data['gsID'];
     $gs = GroupSet::getByID($gsID);
     $groupsetids = array(-1);
     if (is_object($gs)) {
         $groups = $gs->getGroups();
     }
     $list->addToQuery('left join UserGroups ugs on u.uID = ugs.uID');
     $pk = Key::getByHandle('search_users_in_group');
     foreach ($groups as $g) {
         if ($pk->validate($g) && !in_array($g->getGroupID(), $groupsetids)) {
             $groupsetids[] = $g->getGroupID();
         }
     }
     $instr = 'ugs.gID in (' . implode(',', $groupsetids) . ')';
     $list->filter(false, $instr);
 }
Exemplo n.º 14
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $filterGIDs = array();
     if (isset($this->data['gID']) && is_array($this->data['gID'])) {
         foreach ($this->data['gID'] as $gID) {
             $g = \Group::getByID($gID);
             if (is_object($g)) {
                 $gp = new \Permissions($g);
                 if ($gp->canSearchUsersInGroup()) {
                     $filterGIDs[] = $g->getGroupID();
                 }
             }
         }
     }
     foreach ($filterGIDs as $gID) {
         $list->filterByGroupID($gID);
     }
 }
Exemplo n.º 15
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $extension = $this->data['extension'];
     $list->filterByExtension($extension);
 }
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $list->filter('cInheritPermissionsFrom', $this->data['cInheritPermissionsFrom']);
 }
Exemplo n.º 17
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $keywords = $this->data['keywords'];
     $list->filterByKeywords($keywords);
 }
Exemplo n.º 18
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $list->filter('pThemeID', $this->data['pThemeID']);
 }
Exemplo n.º 19
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $type = $this->data['type'];
     $list->filterByType($type);
 }
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $bt = BlockType::getByID($this->data['btID']);
     $list->filterByBlockType($bt);
 }
Exemplo n.º 21
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $from = $this->data['size_from'];
     $to = $this->data['size_to'];
     $list->filterBySize($from, $to);
 }
Exemplo n.º 22
0
 /**
  * @param FileList $list
  * @param $request
  */
 public function filterList(ItemList $list)
 {
     $list->filterByPageTypeID($this->data['ptID']);
 }