• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP sfWidgetForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: configure

 /**
  * Configures the current widget.
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('image', false);
     $this->addOption('date_widget', new sfWidgetFormDate());
     $this->addOption('time_widget', new sfWidgetFormTime());
 }
开发者ID:GustavoAdolfo,项目名称:cmais-frontend-2,代码行数:15,代码来源:sfWidgetAstolfoDateTimeForm.class.php


示例2: configure

 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('from_date');
     $this->addOption('to_date');
     if (LeavePeriodService::getLeavePeriodStatus() == LeavePeriodService::LEAVE_PERIOD_STATUS_FORCED) {
         $this->addOption('choices', null);
         $this->addOption('from_label', '');
         $this->addOption('to_label', '');
         $this->addOption('leave_period', '');
         $this->addOption('from_label_template', "");
         $this->addOption('to_label_template', "");
         $this->addOption('template', '%leave_period% %from_date%  %to_date%');
         $this->setOption('from_date', new sfWidgetFormInputHidden(array(), array('id' => 'date_from')));
         $this->setOption('to_date', new sfWidgetFormInputHidden(array(), array('id' => 'date_to')));
         $this->setOption('leave_period', new sfWidgetFormChoice(array('choices' => array()), array('id' => 'period')));
     } else {
         $this->addOption('from_label', '');
         $this->addOption('to_label', 'to');
         $this->addOption('from_label_template', "<label for='%from_id%' class='date_range_label'>%from_label%</label>");
         $this->addOption('to_label_template', "<label for='%to_id%' class='date_range_label'>%to_label%</label>");
         $this->addOption('template', '%from_label% %from_date% %to_label% %to_date%');
         $this->setOption('from_date', new ohrmWidgetDatePicker(array(), array('id' => 'date_from')));
         $this->setOption('to_date', new ohrmWidgetDatePicker(array(), array('id' => 'date_to')));
     }
 }
开发者ID:abdocmd,项目名称:spmillen,代码行数:26,代码来源:ohrmWidgetFormLeavePeriod.class.php


示例3: configure

	protected function configure($options = array(), $attributes = array()) {
		$this->addOption('image', false);
		$this->addOption('include_time', false);
		$this->addOption('date_widget', new sfWidgetFormInput());

		parent::configure($options, $attributes);
	}
开发者ID:romankallweit,项目名称:swingmachine,代码行数:7,代码来源:sfWidgetFormTextDateInputJQueryDatePicker.class.php


示例4: __construct

 /**
  * Constructor.
  *
  * Available options:
  *
  *  * public_key:        Your reCAPTCHA public key (app_recaptcha_private_key by default)
  *  * error:             A reCAPTCHA error code
  *  * use_ssl:           Use a secure connection (false by default)
  *
  * @param array  $options An array of options
  * @param array  $messages An array of error messages
  *
  * @see sfWidgetForm
  */
 public function __construct($options = array(), $attributes = array())
 {
     $this->addOption('public_key', sfConfig::get('app_recaptcha_public_key'));
     $this->addOption('error', null);
     $this->addOption('use_ssl', false);
     parent::__construct($options, $attributes);
 }
开发者ID:kidh0,项目名称:swbrasil,代码行数:21,代码来源:sfAnotherWidgetFormReCaptcha.class.php


示例5: configure

 public function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('prefix_widget', new sfWidgetFormInput(array(), array('class' => 'mtWidgetFormCuilPrefix')));
     $this->addOption('middle_widget', new sfWidgetFormInput(array(), array('class' => 'mtWidgetFormCuilMiddle')));
     $this->addOption('suffix_widget', new sfWidgetFormInput(array(), array('class' => 'mtWidgetFormCuilSuffix')));
     $this->addOption('separator', '-');
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:8,代码来源:mtWidgetFormCuil.class.php


示例6: configure

 /**
  * Constructor.
  *
  * Available options:
  *
  *  * format:                 The time format string (%hour%:%minute%)
  *  * hours:                  An array of hours for the hour select tag (optional)
  *  * minutes:                An array of minutes for the minute select tag (optional)
  *  * can_be_empty:           Whether the widget accept an empty value (true by default)
  *  * empty_value:            String to use as empty value
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('format', '%hour%:%minute%');
     $this->addOption('hours', parent::generateTwoCharsRange(0, 23));
     $this->addOption('minutes', array('00', '15', '30', '45'));
     $this->addOption('can_be_empty', true);
     $this->addOption('empty_value', '');
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:24,代码来源:ohrmWidgetTimeDropDown.php


示例7: configure

 /**
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInput
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('partial');
     $this->addOption('buttons', array('add_file' => 'Add files...', 'upload' => 'Start upload', 'cancel' => 'Cancel upload'));
     $this->addOption('module_partial', false);
     $this->addOption('include_js', false);
 }
开发者ID:sensorsix,项目名称:app,代码行数:14,代码来源:laWidgetFileUpload.class.php


示例8: configure

 /**
  * Configures the current widget.
  *
  * The attributes are passed to both the date and the time widget.
  *
  * If you want to pass HTML attributes to one of the two widget, pass an
  * attributes option to the date or time option (see below).
  *
  * Available options:
  *
  *  * format_date: The format string in js and php for date. (see http://docs.jquery.com/UI/Datepicker/formatDate) (see http://www.php.net/date)
  *  * date:      Options for the date widget (see sfWidgetFormDate)
  *  * hours:     Options for the hours widget (see sfWidgetFormChoice)
  *  * minutes:   Options for the minutes widget (see sfWidgetFormChoice)
  *  * period:    Options for the period widget (see sfWidgetFormChoice)
  *  * format:    The format string for the datetime widget (default to %date% %hours% %minutes% %period%)
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('format_date', array('js' => 'ISO_8601', 'php' => 'Y-m-d H:i:s'));
     $this->addOption('date', array());
     $this->addOption('hours', array('choices' => parent::generateTwoCharsRange(1, 12)));
     $this->addOption('minutes', array('choices' => parent::generateTwoCharsRange(0, 59)));
     $this->addOption('period', array('choices' => array('AM' => 'AM', 'noon' => 'Noon', 'PM' => 'PM', 'midnight' => 'Midnight')));
     $this->addOption('format', '%date% %hours% %minutes% %period%');
 }
开发者ID:yasirgit,项目名称:afids,代码行数:30,代码来源:widgetFormDateTimeCustom.class.php


示例9: configure

 /**
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormInput
  *
  *
  * In reality builds an array of two controls using the [] form field
  * name syntax
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('type', 'file');
     $this->addOption('existing-html', false);
     $this->addOption('image-preview', null);
     $this->addOption('default-preview', null);
     $this->setOption('needs_multipart', true);
 }
开发者ID:verenate,项目名称:gri,代码行数:19,代码来源:aWidgetFormInputFilePersistent.class.php


示例10: configure

 protected function configure($options = array(), $attributes = array())
 {
     $attributes['size'] = "5";
     $attributes['maxlength'] = "5";
     $this->addOption('time_widget', new sfWidgetFormInput(array(), $attributes));
     $this->addOption('start_stop', false);
     $this->addOption('interval', false);
     parent::configure($options, $attributes);
 }
开发者ID:nidhhoggr,项目名称:sfSelectTimeInputJQueryTimePickerPlugin,代码行数:9,代码来源:sfWidgetFormSelectTimeInputJQueryTimePicker.class.php


示例11: __construct

 /**
  * Constructor.
  * 
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 public function __construct($options = array(), $attributes = array())
 {
     $this->addRequiredOption('widget');
     $this->addOption('is_edit_public_flag', false);
     $this->addOption('public_flag_default', 1);
     $this->addOption('template', '%input%<br>%public_flag%');
     parent::__construct($options, $attributes);
     $this->setLabel($this->getOption('widget')->getLabel());
 }
开发者ID:Kazuhiro-Murota,项目名称:OpenPNE3,代码行数:17,代码来源:opWidgetFormProfile.class.php


示例12: configure

 /**
  * Configures the current widget.
  *
  * Available options:
  *
  *  * format:       The date format string (%month%/%day%/%year% by default)
  *  * years:        An array of years for the year select tag (optional)
  *  * months:       An array of months for the month select tag (optional)
  *  * days:         An array of days for the day select tag (optional)
  *  * can_be_empty: Whether the widget accept an empty value (true by default)
  *  * empty_values: An array of values to use for the empty value (empty string for year, month, and date by default)
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('format', '%month%/%day%/%year%');
     $this->addOption('days', parent::generateTwoCharsRange(1, 31));
     $this->addOption('months', parent::generateTwoCharsRange(1, 12));
     $years = range(date('Y') - 5, date('Y') + 5);
     $this->addOption('years', array_combine($years, $years));
     $this->addOption('can_be_empty', true);
     $this->addOption('empty_values', array('year' => '', 'month' => '', 'day' => ''));
 }
开发者ID:JimmyVB,项目名称:Symfony-v1.2,代码行数:27,代码来源:sfWidgetFormDate.class.php


示例13: configure

 /**
  * Constructor.
  *
  * Available options:
  *
  *  * format:                 The time format string (%hour%:%minute%:%second%)
  *  * format_without_seconds: The time format string without seconds (%hour%:%minute%)
  *  * with_seconds:           Whether to include a select for seconds (false by default)
  *  * hours:                  An array of hours for the hour select tag (optional)
  *  * minutes:                An array of minutes for the minute select tag (optional)
  *  * seconds:                An array of seconds for the second select tag (optional)
  *  * can_be_empty:           Whether the widget accept an empty value (true by default)
  *  * empty_values:           An array of values to use for the empty value (empty string for hours, minutes, and seconds by default)
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('format', '%hour%:%minute%:%second%');
     $this->addOption('format_without_seconds', '%hour%:%minute%');
     $this->addOption('with_seconds', false);
     $this->addOption('hours', parent::generateTwoCharsRange(0, 23));
     $this->addOption('minutes', parent::generateTwoCharsRange(0, 59));
     $this->addOption('seconds', parent::generateTwoCharsRange(0, 59));
     $this->addOption('can_be_empty', true);
     $this->addOption('empty_values', array('hour' => '', 'minute' => '', 'second' => ''));
 }
开发者ID:sensorsix,项目名称:app,代码行数:30,代码来源:sfWidgetFormTime.class.php


示例14: configure

 /**
  * Configures the current widget.
  *
  * Available options:
  *
  *  * image:       The image path to represent the widget (false by default)
  *  * config:      A JavaScript array that configures the JQuery date widget
  *  * culture:     The user culture
  *  * date_widget: The date widget instance to use as a "base" class
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('image', false);
     $this->addOption('config', '{}');
     $this->addOption('culture', '');
     $this->addOption('date_widget', new sfWidgetFormDate());
     parent::configure($options, $attributes);
     if ('en' == $this->getOption('culture')) {
         $this->setOption('culture', 'en');
     }
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:26,代码来源:sfWidgetFormJQueryDate.class.php


示例15: configure

 /**
  * 
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  * @see sfWidgetFormInput
  * *
  * In reality builds an array of two controls using the [] form field
  * name syntax
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('type', 'file');
     $this->addOption('existing-html', false);
     // Provides an inline preview. You can also call getPreviewUrl() to get the
     // current preview URL for the image if there is one, which allows you to
     // preview outside the widget
     $this->addOption('image-preview', null);
     $this->addOption('default-preview', null);
     $this->setOption('needs_multipart', true);
 }
开发者ID:hashir,项目名称:UoA,代码行数:21,代码来源:aWidgetFormInputFilePersistent.class.php


示例16: configure

 /**
  * Configures the current widget.
  *
  * Available options:
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('format', '%day%/%month%/%year%');
     if (isset($options['years'])) {
         $years = $options['years'];
     } else {
         $years = range(date('Y') - 15, date('Y') + 5);
     }
     $this->addOption('years', array_combine($years, $years));
     $this->addOption('date_widget', new sfWidgetFormDate(array('format' => $this->getOption('format'), 'years' => $this->getOption('years'))));
     parent::configure($options, $attributes);
 }
开发者ID:vik0803,项目名称:helpdesk,代码行数:22,代码来源:sfWidgetFormBootstrapDate.class.php


示例17: configure

 /**
  * Configures the current widget.
  *
  * Available options details in 
  * http://www.symfony-project.org/plugins/sfDependentSelectPlugin
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('depends', '');
     $this->addOption('add_empty', true);
     // ajax
     $this->addOption('ajax', false);
     $this->addOption('cache', true);
     $this->addOption('params', array());
     $this->addOption('url', sfContext::getInstance()->getController()->genUrl('sfDependentSelectAuto/_ajax'));
     // source
     $this->addRequiredOption('source_class', '');
     $this->addOption('source_params', array());
     parent::configure($options, $attributes);
 }
开发者ID:eyumay,项目名称:srms.psco,代码行数:25,代码来源:sfWidgetFormDependentSelect.class.php


示例18: configure

 /**
  * Configures the current widget.
  *
  * Available options:
  *
  * @param string   culture           Sets culture for the widget
  * @param boolean  change_month      If date chooser attached to widget has month select dropdown, defaults to false
  * @param boolean  change_year       If date chooser attached to widget has year select dropdown, defaults to false
  * @param integer  number_of_months  Number of months visible in date chooser, defaults to 1
  * @param boolean  show_button_panel If date chooser shows panel with 'today' and 'done' buttons, defaults to false
  * @param string   theme             css theme for jquery ui interface, defaults to '/sfJQueryUIPlugin/css/ui-lightness/jquery-ui.css'
  * 
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     if (sfContext::hasInstance()) {
         $this->addOption('culture', sfContext::getInstance()->getUser()->getCulture());
     } else {
         $this->addOption('culture', "en");
     }
     $this->addOption('change_month', false);
     $this->addOption('change_year', false);
     $this->addOption('number_of_months', 1);
     $this->addOption('show_button_panel', false);
     $this->addOption('theme', '/sfJQueryUIPlugin/css/ui-lightness/jquery-ui.css');
     parent::configure($options, $attributes);
 }
开发者ID:jmiridis,项目名称:atcsf1,代码行数:28,代码来源:sfWidgetFormDateJQueryUI.class.php


示例19: configure

 /**
  * Constructor.
  *
  * Available options:
  *
  *  * format:                 The time format string (%hour%:%minute%:%second%)
  *  * format_without_seconds: The time format string without seconds (%hour%:%minute%)
  *  * with_seconds:           Whether to include a select for seconds (false by default)
  *  * hours:                  An array of hours for the hour select tag (optional)
  *  * minutes:                An array of minutes for the minute select tag (optional)
  *  * seconds:                An array of seconds for the second select tag (optional)
  *  * can_be_empty:           Whether the widget accept an empty value (true by default)
  *  * empty_values:           An array of values to use for the empty value (empty string for hours, minutes, and seconds by default)
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $with_meridiem = isset($options['with_meridiem']) && $options['with_meridiem'];
     $this->addOption('format', '%hour%:%minute%:%second%' . ($with_meridiem ? ' %meridiem%' : ''));
     $this->addOption('format_without_seconds', '%hour%:%minute%' . ($with_meridiem ? ' %meridiem%' : ''));
     $this->addOption('with_seconds', false);
     $this->addOption('with_meridiem', false);
     $this->addOption('hours', $with_meridiem ? parent::generateTwoCharsRange(1, 12) : parent::generateTwoCharsRange(0, 23));
     $this->addOption('minutes', parent::generateTwoCharsRange(0, 59));
     $this->addOption('seconds', parent::generateTwoCharsRange(0, 59));
     $this->addOption('meridiem', array('am' => 'AM', 'pm' => 'PM'));
     $this->addOption('can_be_empty', true);
     $this->addOption('empty_values', array('hour' => '', 'minute' => '', 'second' => '', 'meridiem' => ''));
 }
开发者ID:bshaffer,项目名称:Symfony-Snippets,代码行数:33,代码来源:csWidgetFormTime.class.php


示例20: configure

 public function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     /* Options used to create the embedded form */
     $this->addRequiredOption('form_creation_method');
     $this->addRequiredOption('edit_form_creation_method');
     $this->addRequiredOption('child_form_name');
     $this->addOption('child_form_title_method', '');
     $this->addOption('title', '');
     $this->addOption('form_creation_method_params', array());
     $this->addOption('form_formatter', 'table');
     $this->addOption('renderer_class', 'mtWidgetFormEmbedRenderer');
     /* Options used to update the parent form */
     $this->addRequiredOption('parent_form');
     /* Initial object */
     $this->addRequiredOption('objects');
     /* Format options */
     $this->addOption('toolbar-add', true);
     $this->addOption('toolbar-add-image', '/dcFormExtraPlugin/images/plus.png');
     $this->addOption('toolbar-add-text', 'add');
     $this->addOption('toolbar-clean', true);
     $this->addOption('toolbar-clean-text', 'clean');
     $this->addOption('toolbar-clean-image', '/dcFormExtraPlugin/images/clean.png');
     $this->addOption('toolbar-reset', true);
     $this->addOption('toolbar-reset-text', 'reset');
     $this->addOption('toolbar-reset-image', '/dcFormExtraPlugin/images/update.png');
     $this->addOption('delete-button-image', '/dcFormExtraPlugin/images/close-action.png');
     $this->addOption('delete-button-text', 'delete');
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:29,代码来源:mtWidgetFormEmbed.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP sfWidgetFormInput类代码示例发布时间:2022-05-23
下一篇:
PHP sfWebResponse类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap