Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
modules
social
SocialModule.php
1
<?php
2
/**
3
*
4
*/
5
class
SocialModule
extends
CWebModule
6
{
7
/**
8
* @var string email used for mailsending
9
*/
10
public
$mailsendingEmail;
11
12
private
$_assetsUrl;
13
14
/**
15
* Import dependent classes
16
*
17
* @return void
18
*/
19
public
function
init
()
20
{
21
// import the module-level models and components
22
$this->setImport(
23
array(
24
'social.models.*'
,
25
)
26
);
27
}
28
29
/**
30
* Publish module assets and return url
31
*
32
* @return string
33
*/
34
public
function
getAssetsUrl
()
35
{
36
if
(!$this->_assetsUrl) {
37
$this->_assetsUrl = Yii::app()->assetManager->publish(Yii::getPathOfAlias(
'social.assets'
),
true
);
38
}
39
return
$this->_assetsUrl;
40
}
41
42
/**
43
* Translates a message to the specified language.
44
*
45
* @param string $str message
46
* @param array $params params
47
* @param string $dic dictionary
48
*
49
* @return string
50
*/
51
public
static
function
t
($str =
''
, $params = array(), $dic =
'core'
)
52
{
53
return
Yii::t
(
"SocialModule."
. $dic, $str, $params);
54
}
55
56
public
function
createMailsendingUrl()
57
{
58
return
Yii::app()->createUrl(
'/social/mailsending'
, array(
'link'
=> Yii::app()->createAbsoluteUrl(Yii::app()->request->getRequestUri()),
'lang'
=> Yii::app()->language));
59
}
60
}
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2