當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Kwc_Abstract_Form::_init方法代碼示例

本文整理匯總了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());
 }
開發者ID:koala-framework,項目名稱:koala-framework,代碼行數:7,代碼來源:Form.php

示例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);
             }
         }
     }
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:50,代碼來源:Form.php

示例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);
         }
     }
 }
開發者ID:koala-framework,項目名稱:koala-framework,代碼行數:23,代碼來源:Form.php

示例4: _init

 protected function _init()
 {
     parent::_init();
     $this->add(new Kwf_Form_Field_TextField('text', 'Text'));
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:5,代碼來源:Form.php


注:本文中的Kwc_Abstract_Form::_init方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。