本文整理匯總了PHP中eZSolr::pushElevateConfiguration方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZSolr::pushElevateConfiguration方法的具體用法?PHP eZSolr::pushElevateConfiguration怎麽用?PHP eZSolr::pushElevateConfiguration使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZSolr
的用法示例。
在下文中一共展示了eZSolr::pushElevateConfiguration方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: if
if ( $http->hasPostVariable( 'ezfind-searchelevateconfigurations-fuzzy' ) )
$fuzzyFilter = true;
elseif ( $Params['FuzzyFilter'] !== false )
$fuzzyFilter = true;
// Pass the fuzzy filter on to the template, search will occur there.
if ( $fuzzyFilter )
$viewParameters = array_merge( $viewParameters, array( 'fuzzy_filter' => $fuzzyFilter ) );
}
// Synchronise Elevate configuration with Solr :
else if ( $http->hasPostVariable( 'ezfind-elevate-synchronise' ) )
{
$solr = new eZSolr();
//if ( eZFindElevateConfiguration::synchronizeWithSolr() )
if ( $solr->pushElevateConfiguration() )
{
$feedback['synchronisation_ok'] = true;
}
else
{
$feedback['synchronisation_fail'] = true;
//TODO: aggregate error messages from multiple shards in eZSolr->pushElevateConfiguration()
//then change here accordingly
$feedback['synchronisation_fail_message'] = eZFindElevateConfiguration::$lastSynchronizationError;
}
}
$viewParameters = array_merge( $viewParameters, array( 'offset' => ( isset( $Params['Offset'] ) and is_numeric( $Params['Offset'] ) ) ? $Params['Offset'] : 0 ) );
$tpl->setVariable( 'view_parameters', $viewParameters );
$tpl->setVariable( 'feedback', $feedback );