Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
BulkModule.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  * Like module class file.
11  */
12 class BulkModule extends CWebModule
13 {
14  private $_assetsUrl;
15 
16  /**
17  * Initialize widget. Import like models.
18  *
19  * @return void
20  */
21  public function init()
22  {
23  // import the module-level models and components
24  $this->setImport(
25  array(
26  'bulk.models.*',
27  'bulk.extensions.php-faker.Faker',
28  'like.models.*',
29  'comments.models.*',
30  'user.models.*'
31  )
32  );
33  }
34 
35  /**
36  * Translates a message to the specified language.
37  *
38  * @param string $str message
39  * @param array $params params
40  * @param string $dic dictionary
41  *
42  * @return string
43  */
44  public static function t($str = '', $params = array(), $dic = 'bulk')
45  {
46  return Yii::t("BulkModule." . $dic, $str, $params);
47  }
48 
49  public function getAssetsUrl()
50  {
51  if (!$this->_assetsUrl) {
52  $this->_assetsUrl = Yii::app()->assetManager->publish(Yii::getPathOfAlias('bulk.views.asset'), true);
53  }
54  return $this->_assetsUrl;
55  }
56 }