本文整理汇总了PHP中SearchEngine::helpNamespaces方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchEngine::helpNamespaces方法的具体用法?PHP SearchEngine::helpNamespaces怎么用?PHP SearchEngine::helpNamespaces使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchEngine
的用法示例。
在下文中一共展示了SearchEngine::helpNamespaces方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSearchProfiles
/**
* @return array
*/
protected function getSearchProfiles() {
// Builds list of Search Types (profiles)
$nsAllSet = array_keys( SearchEngine::searchableNamespaces() );
$profiles = array(
'default' => array(
'message' => 'searchprofile-articles',
'tooltip' => 'searchprofile-articles-tooltip',
'namespaces' => SearchEngine::defaultNamespaces(),
'namespace-messages' => SearchEngine::namespacesAsText(
SearchEngine::defaultNamespaces()
),
),
'images' => array(
'message' => 'searchprofile-images',
'tooltip' => 'searchprofile-images-tooltip',
'namespaces' => array( NS_FILE ),
),
'help' => array(
'message' => 'searchprofile-project',
'tooltip' => 'searchprofile-project-tooltip',
'namespaces' => SearchEngine::helpNamespaces(),
'namespace-messages' => SearchEngine::namespacesAsText(
SearchEngine::helpNamespaces()
),
),
'all' => array(
'message' => 'searchprofile-everything',
'tooltip' => 'searchprofile-everything-tooltip',
'namespaces' => $nsAllSet,
),
'advanced' => array(
'message' => 'searchprofile-advanced',
'tooltip' => 'searchprofile-advanced-tooltip',
'namespaces' => self::NAMESPACES_CURRENT,
)
);
wfRunHooks( 'SpecialSearchProfiles', array( &$profiles ) );
foreach ( $profiles as &$data ) {
if ( !is_array( $data['namespaces'] ) ) {
continue;
}
sort( $data['namespaces'] );
}
return $profiles;
}
示例2: getSearchProfiles
protected function getSearchProfiles()
{
// Builds list of Search Types (profiles)
$nsAllSet = array_keys(SearchEngine::searchableNamespaces());
$profiles = array('default' => array('message' => 'searchprofile-articles', 'tooltip' => 'searchprofile-articles-tooltip', 'namespaces' => SearchEngine::defaultNamespaces(), 'namespace-messages' => SearchEngine::namespacesAsText(SearchEngine::defaultNamespaces())), 'images' => array('message' => 'searchprofile-images', 'tooltip' => 'searchprofile-images-tooltip', 'namespaces' => array(NS_FILE)), 'help' => array('message' => 'searchprofile-project', 'tooltip' => 'searchprofile-project-tooltip', 'namespaces' => SearchEngine::helpNamespaces(), 'namespace-messages' => SearchEngine::namespacesAsText(SearchEngine::helpNamespaces())), 'all' => array('message' => 'searchprofile-everything', 'tooltip' => 'searchprofile-everything-tooltip', 'namespaces' => $nsAllSet), 'advanced' => array('message' => 'searchprofile-advanced', 'tooltip' => 'searchprofile-advanced-tooltip', 'namespaces' => $this->namespaces, 'parameters' => array('advanced' => 1)));
wfRunHooks('SpecialSearchProfiles', array(&$profiles));
foreach ($profiles as $key => &$data) {
sort($data['namespaces']);
}
return $profiles;
}