当前位置: 首页>>代码示例>>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;未经允许,请勿转载。