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


PHP Kwc_Abstract_Form::_initFields方法代码示例

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


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

示例1: _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

示例2: _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

示例3: _initFields

 protected function _initFields()
 {
     $this->setCreateMissingRow(true);
     parent::_initFields();
     $tagsControllerUrl = Kwc_Abstract_Admin::getInstance($this->getClass())->getControllerUrl();
     $this->add(new Kwf_Form_Field_SuperBoxSelect('ComponentToTag', 'Tag', trlKwf('Tags')))->setWidth(300)->setListWidth(300)->setTpl('<tpl for="."><div class="x2-combo-list-item">{name} <span style="font-size: 10px; color: gray;">({count_used} ' . trlKwf('uses') . ')</span></div></tpl>')->setAllowAddNewData(true)->setTriggerAction('all')->setMinChars(1)->setValues($tagsControllerUrl . '/json-data')->setAddNewItemUrl($tagsControllerUrl . '/json-add-item');
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例4: _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

示例5: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->prepend(new Kwf_Form_Field_NumberField('columns'))->setFieldLabel(trlKwf('Columns'))->setAllowNegative(false)->setAllowDecimals(false)->setMinValue(1)->setMaxValue(10)->setAllowBlank(false)->setWidth(50);
     $this->fields->add(new Kwf_Form_Field_Select('show_pics'))->setFieldLabel(trlKwf('Visible Pictures'))->setWidth(100)->setShowNoSelection(true)->setEmptyText(trlKwf('Show all'))->setValues(array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', '8' => '8'));
     $this->fields->add(new Kwf_Form_Field_Static(trlKwf('Choose a number to just show this number of items and hide the others behind a "more"-button')));
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:SettingsForm.php

示例6: _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

示例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();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwfStatic('Social Media')));
     $fs->add(new Kwf_Form_Field_Checkbox('facebook', trlKwfStatic('Facebook')))->setHideLabel(true)->setBoxLabel(trlKwfStatic('Facebook'));
     $fs->add(new Kwf_Form_Field_Checkbox('twitter', trlKwfStatic('Twitter')))->setHideLabel(true)->setBoxLabel(trlKwfStatic('Twitter'));
     $fs->add(new Kwf_Form_Field_Checkbox('google', trlKwfStatic('Google+')))->setHideLabel(true)->setBoxLabel(trlKwfStatic('Google+'));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例9: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->add(new Kwf_Form_Field_TextField('headline1', trlKwf('Headline 1')))->setWidth(450)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('headline2', trlKwf('Headline 2')))->setWidth(450);
     $this->fields->add(new Kwf_Form_Field_ShowField('original_headline1', trlKwf('Original headline 1')))->setData(new Kwf_Data_Trl_OriginalComponent())->getData()->setFieldname('headline1');
     $this->fields->add(new Kwf_Form_Field_ShowField('original_headline2', trlKwf('Original headline 2')))->setData(new Kwf_Data_Trl_OriginalComponent())->getData()->setFieldname('headline2');
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Form.php

示例10: _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

示例11: _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

示例12: _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

示例13: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $imageTitle = Kwc_Abstract::getSetting(Kwc_Abstract::getSetting($this->getClass(), 'masterComponentClass'), 'imageTitle');
     if ($imageTitle) {
         $this->add(new Kwf_Form_Field_ShowField('original_title', trlKwf('Original Title')))->setData(new Kwf_Data_Trl_OriginalComponent('title'));
         $this->add(new Kwf_Form_Field_TextArea('title', trlKwf('Title')))->setWidth(350)->setHeight(80);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:9,代码来源:Form.php

示例14: _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

示例15: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_ShowField('original_url', trlKwfStatic('Original Url')))->setData(new Kwf_Data_Trl_OriginalComponent('url'));
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwfStatic('Own Url')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_url');
     $fs->add(new Kwf_Form_Field_UrlField('url', trlKwfStatic('URL')))->setAllowBlank(false)->setWidth(400);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:9,代码来源:Form.php


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