本文整理汇总了PHP中Kwc_Abstract_Form::_init方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract_Form::_init方法的具体用法?PHP Kwc_Abstract_Form::_init怎么用?PHP Kwc_Abstract_Form::_init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kwc_Abstract_Form
的用法示例。
在下文中一共展示了Kwc_Abstract_Form::_init方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _init
protected function _init()
{
parent::_init();
$this->setLabelWidth(150);
$this->add(new Kwf_Form_Field_TextField('url', trl('Application URL')))->setWidth(500)->setAllowBlank(false);
$this->add(new Kwf_Form_Field_ShowField('template_url', trl('HTML Template URL')))->setWidth(500)->setData(new Kwc_Advanced_IntegratorTemplate_FormData());
}
示例2: _init
protected function _init()
{
parent::_init();
$this->setLoadAfterSave(true);
$gen = Kwc_Abstract::getSetting($this->getClass(), 'generators');
$classes = $gen['child']['component'];
$cards = $this->add(new Kwf_Form_Container_Cards('component', trlKwf('Type')))->setDefaultValue(key($classes));
$cards->getCombobox()->setWidth(250)->setListWidth(250)->setXtype('kwc.abstract.cards.combobox')->setValues(Kwc_Admin::getInstance($this->getClass())->getControllerUrl('Components') . '/json-data');
foreach ($classes as $name => $class) {
if (!$class) {
continue;
}
$forms = array();
$admin = Kwc_Admin::getInstance($class);
$forms = $admin->getCardForms();
if (!$forms) {
//wenns gar keine forms gibt
$card = $cards->add();
$card->setTitle(Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($class, 'componentName')));
$card->setName($name);
}
foreach ($forms as $k => $i) {
$form = $i['form'];
if ($form) {
if (!$form->getIdTemplate()) {
$form->setIdTemplate('{0}-child');
}
$form->setAutoHeight(true);
$form->setBaseCls('x2-plain');
}
$card = $cards->add();
$card->setTitle($i['title']);
if (count($forms) == 1) {
$card->setName($name);
if ($form) {
$form->setName($name);
}
} else {
$card->setName($name . '_' . $k);
//damits eindeutig ist wenn zB news mehrere forms hat
if ($form) {
$form->setName($name . '_' . $k);
}
}
if ($form) {
$card->add($form);
}
}
}
}
示例3: _init
protected function _init()
{
parent::_init();
$gen = Kwc_Abstract::getSetting($this->getClass(), 'generators');
$classes = $gen['child']['component'];
$cards = $this->add(new Kwf_Form_Container_Cards('component', trlKwf('Type')))->setDefaultValue(key($classes));
$hidden = new Kwf_Form_Field_Hidden('component');
$hidden->setData(new Kwc_Abstract_Cards_Trl_Form_ComponentData());
$cards->setCombobox($hidden);
foreach ($classes as $name => $class) {
$form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-' . $name, $name);
if ($form) {
$form->setIdTemplate('{0}-child');
$form->setAutoHeight(true);
$form->setBaseCls('x2-plain');
}
$card = $cards->add();
$card->setName($name);
if ($form) {
$card->add($form);
}
}
}
示例4: _init
protected function _init()
{
parent::_init();
$this->add(new Kwf_Form_Field_TextField('text', 'Text'));
}