forked from koala-framework/koala-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Component.php
32 lines (30 loc) · 1.01 KB
/
Component.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
class Kwc_Legacy_Headlines_Component extends Kwc_Abstract
{
public static function getSettings()
{
$ret = array_merge(parent::getSettings(), array(
'componentName' => trlKwfStatic('Headlines'),
'componentIcon' => 'text_padding_top',
'ownModel' => 'Kwf_Component_FieldModel',
'rootElementClass' => 'kwfUp-webStandard',
'extConfig' => 'Kwf_Component_Abstract_ExtConfig_Form'
));
$ret['throwHasContentChangedOnRowColumnsUpdate'] = array('headline1', 'headline2');
return $ret;
}
public function getTemplateVars()
{
$ret = parent::getTemplateVars();
$ret['headline1'] = $this->_getRow()->headline1;
$ret['headline2'] = $this->_getRow()->headline2;
return $ret;
}
public function hasContent()
{
if (trim($this->_getRow()->headline1) != "" || trim($this->_getRow()->headline2) != "") {
return true;
}
return false;
}
}