當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Repository::getContentFilter方法代碼示例

本文整理匯總了PHP中Repository::getContentFilter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Repository::getContentFilter方法的具體用法?PHP Repository::getContentFilter怎麽用?PHP Repository::getContentFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Repository的用法示例。


在下文中一共展示了Repository::getContentFilter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initFromHttpVars

 /**
  * Init the selection from the query vars
  * @param array $passedArray
  * @return void
  */
 public function initFromHttpVars($passedArray = null)
 {
     if ($passedArray != null) {
         if (isset($passedArray["selection_nodes"]) && is_array($passedArray["selection_nodes"])) {
             $this->initFromNodes($passedArray["selection_nodes"]);
         } else {
             $this->initFromArray($passedArray);
         }
     } else {
         $this->initFromArray($_GET);
         $this->initFromArray($_POST);
     }
     if (isset($this->repository) && $this->repository->hasContentFilter()) {
         $this->repository->getContentFilter()->filterUserSelection($this);
     }
 }
開發者ID:floffel03,項目名稱:pydio-core,代碼行數:21,代碼來源:class.UserSelection.php

示例2: UserSelection

 /**
  * Construction selector
  * @param Repository|null $repository
  */
 public function UserSelection($repository = null, $httpVars = null)
 {
     $this->files = array();
     if (isset($repository) && $repository->hasContentFilter()) {
         $this->contentFilter = $repository->getContentFilter();
     }
     if (isset($httpVars)) {
         $this->initFromHttpVars($httpVars);
     }
 }
開發者ID:rcmarotz,項目名稱:pydio-core,代碼行數:14,代碼來源:class.UserSelection.php

示例3: switchAction


//.........這裏部分代碼省略.........
                     if (RecycleBinManager::recycleEnabled() && $node->getPath() == RecycleBinManager::getRecyclePath()) {
                         continue;
                     }
                     $node->loadNodeInfo(false, false, $lsOptions["l"] ? "all" : "minimal");
                     if (!empty($node->metaData["nodeName"]) && $node->metaData["nodeName"] != $nodeName) {
                         $node->setUrl(dirname($node->getUrl()) . "/" . $node->metaData["nodeName"]);
                     }
                     if (!empty($node->metaData["hidden"]) && $node->metaData["hidden"] === true) {
                         continue;
                     }
                     if (!empty($node->metaData["mimestring_id"]) && array_key_exists($node->metaData["mimestring_id"], $mess)) {
                         $node->mergeMetadata(array("mimestring" => $mess[$node->metaData["mimestring_id"]]));
                     }
                     if (isset($httpVars["page_position"]) && $httpVars["page_position"] == "true") {
                         // Detect page position: we have to loading "siblings"
                         $parentPath = AJXP_Utils::safeDirname($node->getPath());
                         $siblings = scandir($this->urlBase . $parentPath);
                         foreach ($siblings as $i => $s) {
                             if ($this->filterFile($s, true)) {
                                 unset($siblings[$i]);
                             }
                             if ($this->filterFolder($s)) {
                                 unset($siblings[$i]);
                             }
                         }
                         if (count($siblings) > $threshold) {
                             //usort($siblings, "strcasecmp");
                             $siblings = $this->orderNodes($siblings, $this->urlBase . $parentPath, $orderField, $orderDirection);
                             $index = array_search($node->getLabel(), $siblings);
                             $node->mergeMetadata(array("page_position" => floor($index / $limitPerPage) + 1));
                         }
                     }
                     if ($this->repository->hasContentFilter()) {
                         $externalPath = $this->repository->getContentFilter()->externalPath($node);
                         $node->setUrl($this->urlBase . $externalPath);
                     }
                     AJXP_XMLWriter::renderAjxpNode($node);
                 }
                 AJXP_XMLWriter::close();
                 break;
             }
             $streamIsSeekable = AJXP_MetaStreamWrapper::wrapperIsSeekable($path);
             $sharedHandle = null;
             if ($streamIsSeekable) {
                 $handle = opendir($path);
                 $sharedHandle = $handle;
             }
             $countFiles = $this->countFiles($path, !$lsOptions["f"], false, $sharedHandle);
             if (isset($sharedHandle)) {
                 rewind($handle);
             }
             if (isset($crt_nodes)) {
                 $crt_nodes += $countFiles;
             }
             $totalPages = $crtPage = 1;
             if (isset($threshold) && isset($limitPerPage) && $countFiles > $threshold) {
                 $offset = 0;
                 $crtPage = 1;
                 if (isset($page)) {
                     $offset = (intval($page) - 1) * $limitPerPage;
                     $crtPage = $page;
                 }
                 $totalPages = floor($countFiles / $limitPerPage) + 1;
             } else {
                 $offset = $limitPerPage = 0;
             }
開發者ID:ad-m,項目名稱:pydio-core,代碼行數:67,代碼來源:class.fsAccessDriver.php


注:本文中的Repository::getContentFilter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。