Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
SimpleSearchWidget.php
1 <?php
2 /**
3  * Gentics Portal.Node PHP
4  * Author & Copyright (c) by Gentics Software GmbH
5  * sales@gentics.com
6  * http://www.gentics.com
7  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8  * You must not use this software without a valid license agreement.
9  *
10  */
12 {
13 
14  /**
15  * @var string $useAutosuggest defines if Autosuggestion should be used for current widget
16  */
17  public $useAutosuggest = true;
18 
19  /**
20  * @var string $uniqClassName system generated unique css ckass name
21  */
22  public $uniqClassName;
23 
24  /**
25  * @var string $landingPage defines action for search form
26  */
27  public $landingPage = '';
28 
29 
30  /**
31  * Widget run method.
32  *
33  * @return void
34  */
35 
36  public function run()
37  {
38  $lang = Yii::app()->language;
39  $this->uniqClassName = uniqid('simpleSearch');
40 
41  /* if we did not configure landing page as widget param then take it from settings */
42  if ($this->landingPage == '') {
43  $this->landingPage = SearchModule::getLandingPage($lang);
44  }
45 
46  $this->render('SimpleSearchWidget', array('landingPage' => $this->landingPage));
47  }
48 
49  /**
50  * undocumented function
51  *
52  * @return void
53  * @author Me
54  **/
55  public function getEncryptedAutosuggestUrl()
56  {
57  return 'url';
58  }
59 }