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


PHP Kwc_Abstract_Form类代码示例

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


在下文中一共展示了Kwc_Abstract_Form类的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();
     $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

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

示例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->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(500);
     $this->add(new Kwf_Form_Field_TextArea('teaser', trlKwf('Teaser')))->setWidth(500)->setHeight(100);
     $this->add(new Kwf_Form_Field_DateField('date', trlKwf('Publication')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_Select('author_id', trlKwf('Author')))->setAllowBlank(false)->setWidth(200)->setValues(Kwf_Model_Abstract::getInstance('Kwc_Articles_Directory_AuthorsModel')->getRows());
     $v = new Zend_Validate_Regex('/^[0-9]{4}\\/[0-9]{2}$/');
     $v->setMessage(trlKwf('Please use this format -> Year / Month'), Zend_Validate_Regex::NOT_MATCH);
     $this->add(new Kwf_Form_Field_TextField('vi_nr', trlKwf('VI-Number')))->setWidth(70)->addValidator($v);
     $this->add(Kwc_Abstract_Form::createComponentFormByDbIdTemplate('article_{0}-previewImage', 'previewImage'));
     $columns = $this->add(new Kwf_Form_Container_Columns('is_top'));
     $col = $columns->add(new Kwf_Form_Container_Column());
     $col->setStyle('margin-left: 0px');
     $col->add(new Kwf_Form_Field_Checkbox('is_top_checked', trlKwf('Hot-topic')));
     $col = $columns->add(new Kwf_Form_Container_Column());
     $col->setLabelWidth(50);
     $col->add(new Kwf_Form_Field_DateField('is_top_expire', trlKwf('Ends at')));
     $this->add(new Kwf_Form_Field_Checkbox('read_required', trlKwf('Required reading')));
     $this->add(new Kwf_Form_Field_Checkbox('only_intern', trlKwf('Only intern')));
     $priority = array();
     for ($i = 1; $i <= 10; $i++) {
         $priority[$i] = $i;
     }
     $this->add(new Kwf_Form_Field_Select('priority', trlKwf('Priority')))->setAllowBlank(false)->setValues($priority)->setWidth(40)->setHelpText(trlKwfStatic('For sorting articles if they have same date'));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:26,代码来源:Form.php

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

示例7: __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

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

示例9: getCardForms

 public function getCardForms()
 {
     $ret = array();
     $title = Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($this->_class, 'componentName'));
     $title = str_replace('.', ' ', $title);
     $ret['form'] = array('form' => Kwc_Abstract_Form::createComponentForm($this->_class, 'child'), 'title' => $title);
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Admin.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();
     $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: __construct

 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->add(new Kwf_Form_Field_UrlField('target', trlKwf('Url')))->setWidth(450)->setHelpText(trlKwf('Enter the Internetaddress including "http://". For example if you want to link to Google.com, type "http://www.google.com" into the textfield.'))->setAllowBlank(false)->setVtype('urltel');
     if (Kwc_Abstract::getSetting($class, 'hasPopup')) {
         // cards container erstellen und zu form hinzufügen
         $cards = $this->add(new Kwf_Form_Container_Cards('open_type', trlKwf('Open in')));
         $cards->getCombobox()->setAllowBlank(false);
         $card = $cards->add();
         $card->setTitle(trlKwf('Same window'));
         $card->setName('self');
         $card = $cards->add();
         $card->setTitle(trlKwf('New window'));
         $card->setName('blank');
         $card = $cards->add();
         $card->setTitle(trlKwf('Popup'));
         $card->setName('popup');
         $card->add(new Kwf_Form_Field_TextField('width', 'Width'))->setDefaultValue(400)->setAllowBlank(false)->setVtype('alphanum');
         $card->add(new Kwf_Form_Field_TextField('height', 'Height'))->setDefaultValue(400)->setAllowBlank(false)->setVtype('alphanum');
         $card->add(new Kwf_Form_Field_Checkbox('menubar', 'Menubar'));
         $card->add(new Kwf_Form_Field_Checkbox('toolbar', 'Toolbar'));
         $card->add(new Kwf_Form_Field_Checkbox('locationbar', 'Locationbar'));
         $card->add(new Kwf_Form_Field_Checkbox('statusbar', 'Statusbar'));
         $card->add(new Kwf_Form_Field_Checkbox('scrollbars', 'Scrollbars'));
         $card->add(new Kwf_Form_Field_Checkbox('resizable', 'Resizable'));
     }
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:27,代码来源:Form.php

示例13: __construct

 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->setXtype('Kwc.Basic.DownloadTag');
     $this->fields->add(new Kwf_Form_Field_File('File', trlKwf('File')))->setDirectory('BasicDownloadTag')->setAllowOnlyImages(false)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setVtype('alphanum')->setAutoFillWithFilename('filename')->setHelpText(trlKwf('Enter the name (without file extension), the file should get when downloading it.'))->setWidth(300)->setAllowBlank(false);
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例14: __construct

 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->setXtype('Kwc.Basic.DownloadTag');
     $this->fields->add(new Kwf_Form_Field_File('File', trlKwf('File')))->setDirectory('BasicDownloadTag')->setAllowOnlyImages(false)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setVtype('alphanum')->setAutoFillWithFilename('filename')->setHelpText(hlpKwf('kwf_download_filename'))->setWidth(300)->setAllowBlank(false);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例15: __construct

 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $this->setLabelWidth(200);
     $this->fields->add(new Kwf_Form_Field_TextField('company', trlKwf('Company')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('name', trlKwf('Name')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('address', trlKwf('Address')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('zipcode', trlKwf('Zipcode')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('city', trlKwf('City')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('fon', trlKwf('Fon')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('fax', trlKwf('Fax')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('mobile', trlKwf('Mobile')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('email', trlKwf('EMail')))->setWidth(300)->setVtype('email');
     $this->fields->add(new Kwf_Form_Field_TextField('website', trlKwf('Website')))->setWidth(300)->setVtype('url');
     $this->fields->add(new Kwf_Form_Field_TextField('crn', trlKwf('Commercial register number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('register_court', trlKwf('Register court')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('court', trlKwf('Court')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('uid_number', trlKwf('VAT identification number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('bank_data', trlKwf('Bank data')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('bank_code', trlKwf('Bank code')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('account_number', trlKwf('Account number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('iban', trlKwf('IBAN')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('bic_swift', trlKwf('BIC / SWIFT')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('dvr_number', trlKwf('Data handling register number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('club_number_zvr', trlKwf('Clubnumber ZVR')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextArea('job_title', trlKwf('Job title')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('agency', trlKwf('Agency')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('employment_specification', trlKwf('Employment specification')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('link_company_az', trlKwf('Entry at WK Austria')))->setWidth(300)->setVtype('url');
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:30,代码来源:Form.php


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