Newer
Older
/**
* Get IDs of all QUIQQER Groups
*
* @return int[]
*/
public function getGroupIds()
{
$groupIds = $this->getAttribute('groupIds');
return explode(",", trim($groupIds, ","));
}
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* Get membership title
*
* @param Locale $Locale (optional)
* @return string - localized title
*/
public function getTitle($Locale = null)
{
if (is_null($Locale)) {
$Locale = QUI::getLocale();
}
$trans = json_decode($this->getAttribute('title'), true);
if (isset($trans[$Locale->getCurrent()])) {
return $trans[$Locale->getCurrent()];
}
return '';
}
/**
* Get membership description
*
* @param Locale $Locale (optional)
* @return string - localized description
*/
public function getDescription($Locale = null)
{
if (is_null($Locale)) {
$Locale = QUI::getLocale();
}
$trans = json_decode($this->getAttribute('description'), true);
if (isset($trans[$Locale->getCurrent()])) {
return $trans[$Locale->getCurrent()];
}
return '';
}
/**
* Get membership content
*
* @param Locale $Locale (optional)
* @return string - localized content
*/
public function getContent($Locale = null)
{
if (is_null($Locale)) {
$Locale = QUI::getLocale();
}
$trans = json_decode($this->getAttribute('content'), true);
if (isset($trans[$Locale->getCurrent()])) {
return $trans[$Locale->getCurrent()];
}
return '';
}
/**
* @inheritdoc
*/
public function update()
{
// handle multilingual attributes ?
parent::update();
}