当前位置: 首页>>代码示例>>PHP>>正文


PHP Kwc_Abstract_Form::createChildComponentForm方法代码示例

本文整理汇总了PHP中Kwc_Abstract_Form::createChildComponentForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract_Form::createChildComponentForm方法的具体用法?PHP Kwc_Abstract_Form::createChildComponentForm怎么用?PHP Kwc_Abstract_Form::createChildComponentForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kwc_Abstract_Form的用法示例。


在下文中一共展示了Kwc_Abstract_Form::createChildComponentForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->setCreateMissingRow(true);
     if (!$this->getClass()) {
         return;
     }
     $generators = Kwc_Abstract::getSetting($this->getClass(), 'generators');
     $classes = $generators['child']['component'];
     foreach ($classes as $key => $class) {
         if (!$class) {
             continue;
         }
         $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-{$key}", $key);
         if ($form && count($form->fields)) {
             if ($this->_getIdTemplateForChild($key)) {
                 $form->setIdTemplate($this->_getIdTemplateForChild($key));
             }
             if (!$this->_createFieldsets || !Kwc_Abstract::hasSetting($class, 'componentName')) {
                 $this->add($form);
             } else {
                 $name = Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($class, 'componentName'));
                 $name = str_replace('.', ' ', $name);
                 $this->add(new Kwf_Form_Container_FieldSet($name))->setName($key)->add($form);
             }
         }
     }
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:28,代码来源:Form.php

示例2: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_Checkbox('visible', trlKwf('Visible')));
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-child", 'child');
     $this->add($form);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例3: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "_video", 'video');
     $form->setIdTemplate('{0}_video');
     $this->add($form);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例4: __construct

 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
     $this->add($form);
     $this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Description')))->setWidth(300)->setAutoFillWithFilename('filenameWithExt')->setHelpText(trlKwf('Text, shown after the file icon (automatically generated) and used as link for downloading the file.'))->setAllowBlank(false);
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例5: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $masterCC = Kwc_Abstract::getSetting($this->getClass(), 'masterComponentClass');
     if (Kwc_Abstract::getSetting($masterCC, 'imageCaption')) {
         $this->add(new Kwf_Form_Field_ShowField('original_image_caption', trlKwf('Original Image caption')))->setData(new Kwf_Data_Trl_OriginalComponent('image_caption'));
         $this->add(new Kwf_Form_Field_TextField('image_caption', trlKwf('Image caption')))->setWidth(300);
     }
     if (Kwc_Abstract::getSetting($masterCC, 'editFilename') || Kwc_Abstract::getSetting($masterCC, 'altText') || Kwc_Abstract::getSetting($masterCC, 'titleText')) {
         $fs = $this->add(new Kwf_Form_Container_FieldSet('SEO'));
         $fs->setCollapsible(true);
         $fs->setCollapsed(true);
     }
     if (Kwc_Abstract::getSetting($masterCC, 'editFilename')) {
         $fs->add(new Kwf_Form_Field_ShowField('original_filename', trlKwf('Original {0}', trlKwf('Filename'))))->setData(new Kwf_Data_Trl_OriginalComponent('filename'));
         $fs->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setWidth(300)->setHelpText(trlKwf('Talking filename ("lorem-ipsum-2015"), hyphens and underscores are allowed.'));
     }
     if (Kwc_Abstract::getSetting($masterCC, 'altText')) {
         $fs->add(new Kwf_Form_Field_ShowField('original_alt_text', trlKwf('Original {0}', 'ALT Text')))->setData(new Kwf_Data_Trl_OriginalComponent('alt_text'));
         $fs->add(new Kwf_Form_Field_TextField('alt_text', 'ALT Text'))->setWidth(300)->setHelpText(trlKwf('Short, meaningful description of the image content.'));
     }
     if (Kwc_Abstract::getSetting($masterCC, 'titleText')) {
         $fs->add(new Kwf_Form_Field_ShowField('original_title_text', trlKwf('Original {0}', 'ALT Text')))->setData(new Kwf_Data_Trl_OriginalComponent('title_text'));
         $fs->add(new Kwf_Form_Field_TextField('title_text', 'IMG Title'))->setWidth(300)->setHelpText(trlKwf('Some browsers show the text as a tooltip when the mouse pointer is hovering the image.'));
     }
     $this->add(new Kwf_Form_Field_ShowField('image', trlKwf('Original Image')))->setData(new Kwc_Abstract_Image_Trl_Form_ImageData());
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Own Image')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_image');
     $fs->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-image', 'image'));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:31,代码来源:Form.php

示例6: __construct

 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
     $this->add($form);
     $this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Description')))->setWidth(300)->setAutoFillWithFilename('filenameWithExt')->setHelpText(hlpKwf('kwc_download_linktext'))->setAllowBlank(false);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例7: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->setCreateMissingRow(true);
     $this->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-linktext', 'linktext'));
     $this->add(new Kwf_Form_Field_Checkbox('start_opened', trlKwf('Start opened')));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例8: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->setCreateMissingRow(true);
     $this->setModel(new Kwf_Model_FnF());
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-linkTag", 'linkTag');
     $this->add($form);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例9: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '_mail');
     $form->setIdTemplate('{component_id}_{id}_mail');
     $this->add($form);
     $this->add(new Kwf_Form_Field_ShowField('create_date', trlKwf('Creation Date')))->setWidth(300);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例10: __construct

 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
     $this->add($form);
     $this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Descriptiontext')))->setWidth(300)->setHelpText(hlpKwf('kwc_download_linktext'));
     $this->add(new Kwf_Form_Field_ShowField('original_infotext', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('infotext'));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例11: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Own Flash')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_flash');
     $fs->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-flash', 'flash'));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例12: __construct

 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
     $this->add($form);
     $this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Descriptiontext')))->setWidth(300)->setHelpText(trlKwf('Text, shown after the file icon (automatically generated) and used as link for downloading the file.'));
     $this->add(new Kwf_Form_Field_ShowField('original_infotext', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('infotext'));
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例13: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Own Download')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_download');
     $fs->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-download', 'download'));
     $this->add(new Kwf_Form_Field_ShowField('original_filename', trlKwf('Original Filename')))->setData(new Kwc_Basic_DownloadTag_Trl_Form_OriginalData('filename'));
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:9,代码来源:Form.php

示例14: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-linkTag");
     if (count($form->fields)) {
         $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Click on Preview Image') . ':'));
         $fs->add($form);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:9,代码来源:Form.php

示例15: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-image"));
     if (!$this->getModel()) {
         $this->setModel(new Kwf_Model_FnF());
         $this->setCreateMissingRow(true);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:9,代码来源:Form.php


注:本文中的Kwc_Abstract_Form::createChildComponentForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。