本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}