예제 #1
0
 /**
  * Apply any customizations to the FileList query
  * @param \Concrete\Core\File\FileList $fileListObj
  */
 protected function applyFileListFilters(\Concrete\Core\File\FileList $fileListObj)
 {
     if ((int) $this->fileSource === self::FILE_SOURCE_CUSTOM) {
         $fileListObj->getQueryObject()->join('f', $this->btTableSecondary, 'btsecondary', 'f.fID = btsecondary.fileID');
         $fileListObj->getQueryObject()->andWhere('btsecondary.bID = :bRecordID');
         $fileListObj->getQueryObject()->setParameter(':bRecordID', $this->bID);
         $fileListObj->getQueryObject()->orderBy('btsecondary.displayOrder', 'asc');
     }
     if ((int) $this->fileSource === self::FILE_SOURCE_SET) {
         $fileSetObj = FileSet::getByID((int) $this->fileSetID);
         if (is_object($fileSetObj)) {
             $fileListObj->filterBySet($fileSetObj);
             $fileListObj->sortByFileSetDisplayOrder();
         }
     }
 }
예제 #2
0
 /**
  * Sorts by file set display order in ascending order.
  */
 public function sortByFileSetDisplayOrder()
 {
     return parent::sortByFileSetDisplayOrder();
 }