forked from koala-framework/koala-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Component.php
28 lines (26 loc) · 858 Bytes
/
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
<?php
class Kwc_Basic_Anchor_Component extends Kwc_Abstract_Composite_Component
{
public static function getSettings()
{
$ret = parent::getSettings();
$ret['componentIcon'] = 'anchor';
$ret['componentName'] = trlKwfStatic('Anchor');
$ret['componentCategory'] = 'layout';
$ret['componentPriority'] = 70;
$ret['ownModel'] = 'Kwf_Component_FieldModel';
$ret['flags']['hasAnchors'] = true;
return $ret;
}
public function getTemplateVars()
{
$ret = parent::getTemplateVars();
$ret['name'] = $this->getRow()->anchor ? $this->getRow()->anchor : null;
$ret['anchorId'] = $this->getData()->componentId;
return $ret;
}
public function getAnchors()
{
return array($this->getData()->componentId => $this->getRow()->anchor);
}
}