本文整理匯總了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();