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


PHP sfWidgetForm::configure方法代码示例

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


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

 /**
  * options:
  *    * form: Required sfForm instance rendered by this widget
  *    * archiver: provide an archiver to sanitize results into a specific format (XML, YAML, etc).  Default is array.
  *    * global_attributes: if specified, attributes are passed as if to a widget.  Apply to ALL widgets
  *
  * @param string $options 
  * @param string $attributes 
  * @return null
  * @author Brent Shaffer
  */
 public function configure($options = array(), $attributes = array())
 {
     $this->addRequiredOption('form');
     $this->addOption('archiver');
     $this->addOption('global_attributes', true);
     return parent::configure($options, $attributes);
 }
开发者ID:bshaffer,项目名称:Symfony-Snippets,代码行数:18,代码来源:sfWidgetFormEmbeddedForm.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: 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

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

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

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

 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

示例9: configure

 public function configure($options = array(), $attributes = array())
 {
     $this->addRequiredOption('choice_widget');
     $this->addRequiredOption('update');
     $this->addRequiredOption('url');
     $this->addOption('on_empty');
     $this->addOption('update_on_load', true);
     parent::configure($options, $attributes);
 }
开发者ID:bshaffer,项目名称:Donate-Nashville,代码行数:9,代码来源:sfWidgetFormChoiceAjaxEvent.class.php

示例10: configure

 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     sfContext::getInstance()->getConfiguration()->loadHelpers('I18N');
     $this->addOption('config', array());
     $this->addOption('enable_timerange', false);
     $this->addOption('from_label', __('From:'));
     $this->addOption('to_label', __('To:'));
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:9,代码来源:alWidgetFormTimepicker.class.php

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

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

示例13: configure

 public function configure($options = array(), $attributes = array())
 {
     $this->addOption('end_date', null);
     $this->addOption('start_date', date('Y-m-d'));
     $this->addOption('starts_on', 'Sunday');
     $this->addOption('ends_on', 'Saturday');
     $this->addOption('index_format', 'Y-m-d');
     $this->addOption('display_format', 'F jS');
     $this->addOption('display_end', false);
     $this->addOption('add_empty', true);
     parent::configure($options, $attributes);
 }
开发者ID:bshaffer,项目名称:Symfony-Snippets,代码行数:12,代码来源:sfWidgetFormChoiceWeek.class.php

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

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


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