Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
APALinesModule.php
1 <?php
2 /**
3  * Created by JetBrains PhpStorm.
4  * User: Andrey
5  * Date: 6/6/13
6  * Time: 11:42 AM
7  * To change this template use File | Settings | File Templates.
8  */
9 
10 class APALinesModule extends CWebModule
11 {
12  private $_assetsUrl;
13 
14  /**
15  * Initialize widget. Import like models.
16  *
17  * @return void
18  */
19  public function init()
20  {
21  // import the module-level models and components
22  $this->setImport(
23  array(
24  'apalines.components.*',
25  'apalines.models.*',
26  )
27  );
28  }
29 
30  /**
31  * Translates a message to the specified language.
32  *
33  * @param string $str message
34  * @param array $params params
35  * @param string $dic dictionary
36  *
37  * @return string
38  */
39  public static function t($str = '', $params = array(), $dic = 'core')
40  {
41  return Yii::t("APALinesModule." . $dic, $str, $params);
42  }
43 
44  public function getAssetsUrl()
45  {
46  if (!$this->_assetsUrl) {
47  $this->_assetsUrl = Yii::app()->assetManager->publish(Yii::getPathOfAlias('bulk.views.asset'), true);
48  }
49  return $this->_assetsUrl;
50  }
51 }