當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。