Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SearchModule Class Reference

Public Member Functions

 getApi ()
 init ()

Static Public Member Functions

static getLandingPage ($lang)
static t ($str= '', $params=array(), $dic= 'search')

Public Attributes

 $cacheTime = 360
 $defaultLandingPage
 $landingPages
 $personalisationDelimiter
 $perPage
 $mimetype
 $whereToSearch
 $searchType
 $staticString = ''
 $urlLimiter

Detailed Description

Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.

Definition at line 12 of file SearchModule.php.

Member Function Documentation

SearchModule::getApi ( )

gets repository API

Returns
void

Definition at line 69 of file SearchModule.php.

{
return Yii::app()->repositoryApi;
}
static SearchModule::getLandingPage (   $lang)
static

gets value for current sep up of search landing page

Parameters
string$lang- defines required language
Returns
string

Definition at line 81 of file SearchModule.php.

Referenced by SimpleSearchWidget\run(), and AdvancedSearchWidget\run().

{
$dbSetting = Yii::app()->getModule('settings')->get('landingPage_'.$lang);
if (!empty($dbSetting)) {
/* check if we have landing page for current language set up in DB */
$landingPage = $dbSetting;
} else {
$dbSetting = Yii::app()->getModule('settings')->get('defaultLandingPage');
if (!empty($dbSetting)) {
/* check if we have default landing page for set up in DB */
$landingPage = $dbSetting;
} else if (isset(Yii::app()->getModule('search')->landingPages[$lang]) && Yii::app()->getModule('search')->landingPages[$lang] != '') {
/* check if we have landing page for current language sep up in config */
$landingPage = Yii::app()->getModule('search')->landingPages[$lang];
} else if (isset(Yii::app()->getModule('search')->defaultLandingPage) && Yii::app()->getModule('search')->defaultLandingPage != '') {
/* check if we have default landing page sep up in config */
$landingPage = Yii::app()->getModule('search')->defaultLandingPage;
} else {
/* take current page url as landing page */
$landingPage = '';
}
}
return $landingPage;
}
SearchModule::init ( )

Import dependent classes

Returns
void

Definition at line 112 of file SearchModule.php.

{
// import the module-level components
$this->setImport(
array(
'search.components.*',
)
);
}
static SearchModule::t (   $str = '',
  $params = array(),
  $dic = 'search' 
)
static

Translates a message to the specified language.

Parameters
string$strmessage
array$paramsparams
string$dicdictionary
Returns
string

Definition at line 131 of file SearchModule.php.

{
return Yii::t("SearchModule." . $dic, $str, $params);
}

Member Data Documentation

SearchModule::$landingPages

array landing pages for every language(pages with SearchResultWidget in different languages)

Definition at line 27 of file SearchModule.php.


The documentation for this class was generated from the following file: