forked from koala-framework/koala-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Component.php
30 lines (27 loc) · 916 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
29
30
<?php
class Kwc_Newsletter_EditSubscriber_Component extends Kwc_Form_Component
{
protected $_recipient;
public static function getSettings()
{
$ret = parent::getSettings();
$ret['placeholder']['submitButton'] = trlKwfStatic('Save');
$ret['generators']['child']['component']['success'] =
'Kwc_Newsletter_EditSubscriber_Success_Component';
$ret['viewCache'] = false;
return $ret;
}
public function processMailRedirectInput($recipient, $params)
{
$this->_recipient = $recipient;
$this->processInput($params);
}
protected function _initForm()
{
$formClass = Kwc_Admin::getComponentClass($this, 'FrontendForm');
$this->_form = new $formClass('form', $this->getData()->componentClass, null);
if ($this->_recipient) {
$this->_form->setId($this->_recipient->id);
}
}
}