本文整理汇总了PHP中SearchResult::filterHidden方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchResult::filterHidden方法的具体用法?PHP SearchResult::filterHidden怎么用?PHP SearchResult::filterHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchResult
的用法示例。
在下文中一共展示了SearchResult::filterHidden方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
}
if (isset($definitions)) {
$totalDefinitionsCount = count($definitions);
if (!$all && $totalDefinitionsCount > PREVIEW_LIMIT) {
$definitions = array_slice($definitions, 0, PREVIEW_LIMIT);
SmartyWrap::assign('totalDefinitionsCount', $totalDefinitionsCount);
}
$searchResults = SearchResult::mapDefinitionArray($definitions);
}
}
$conjugations = NULL;
$declensions = NULL;
if ($searchType == SEARCH_INFLECTED || $searchType == SEARCH_LEXEM_ID || $searchType == SEARCH_FULL_TEXT || $searchType == SEARCH_MULTIWORD) {
// Filter out hidden definitions
$hiddenSources = array();
SearchResult::filterHidden($searchResults, $hiddenSources);
if (Config::get('global.aprilFoolsDay')) {
foreach ($searchResults as $sr) {
$sr->definition->htmlRep = StringUtil::iNoGrammer($sr->definition->htmlRep);
}
}
SmartyWrap::assign('results', $searchResults);
SmartyWrap::assign('hiddenSources', $hiddenSources);
// Maps lexems to arrays of inflected forms (some lexems may lack inflections)
// Also compute the text of the link to the paradigm div,
// which can be 'conjugări', 'declinări' or both
if (!empty($lexems)) {
$conjugations = false;
$declensions = false;
foreach ($lexems as $l) {
$lm = $l->getFirstLexemModel();