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


PHP FormControl::get方法代码示例

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


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

示例1: get

 public function get(Theme $theme)
 {
     $silos = Media::dir();
     foreach ($silos as &$silo) {
         $silo->path_slug = Utils::slugify($silo->path);
     }
     $this->vars['silos'] = $silos;
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:9,代码来源:formcontrolsilos.php

示例2: get

 /**
  * Produce HTML output for this password control.
  *
  * @param Theme $theme The theme to use to render this control
  * @return string HTML for this control in the form
  */
 public function get(Theme $theme)
 {
     if ($url = $this->get_setting('url', false)) {
         $url = Utils::addslashes($url);
         $this->set_properties(array('onclick' => "location.href='{$url}';return false;"));
     }
     $this->properties['value'] = $this->get_setting('caption', '');
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:15,代码来源:formcontrolsubmit.php

示例3: get

 /**
  * Produce the control for display
  * @param Theme $theme The theme that will be used to render the template
  * @return string The output of the template
  */
 public function get(Theme $theme)
 {
     // Because this is a checkbox, the value isn't directly output in the control
     $this->properties['value'] = $this->returned_value;
     if ($this->value == false) {
         unset($this->properties['checked']);
     } else {
         $this->properties['checked'] = 'checked';
     }
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:16,代码来源:formcontrolcheckbox.php

示例4: get

 /**
  * Get this control for display
  * @param Theme $theme The theme to use for rendering
  * @return string The output
  */
 public function get(Theme $theme)
 {
     $this->vars['element'] = $this->get_setting('wrap_element', 'div');
     $content = '';
     foreach ($this->value as $key => $data) {
         // Push the $key of this array item into the control's name
         $this->each(function (FormControl $control) use($key) {
             $control->add_input_array($key);
         });
         $content .= $this->get_contents($theme);
         // Pop the key of this array item out of the control's name
         $this->each(function (FormControl $control) {
             $control->pop_input_array();
         });
     }
     $this->vars['content'] = $content;
     return FormControl::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:23,代码来源:formcontrolrepeater.php

示例5: get

 /**
  * Produce HTML output for this text control.
  *
  * @param boolean $forvalidation True if this control should render error information based on validation.
  * @return string HTML that will render this control in the form
  */
 public function get(Theme $theme)
 {
     $this->vars['options'] = $this->options;
     $this->settings['internal_value'] = true;
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:12,代码来源:formcontrolselect.php

示例6: get

 public function get(Theme $theme)
 {
     $this->properties['type'] = 'hidden';
     $this->properties['data-facet-config'] = json_encode($this->properties['data-facet-config']);
     $this->set_template_properties('div', array('id' => $this->get_visualizer(), 'data-target' => $this->get_id()));
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:7,代码来源:formcontrolfacet.php

示例7: get

	/**
	 * Return the HTML construction of the control, after changing the encoding of the parent form to allow for file uploads.
	 *
	 * @param boolean $forvalidation True if the control should output validation information with the control.
	 */
	public function get( $forvalidation = true )
	{
		$form = $this->get_form();
		$form->properties['enctype'] = 'multipart/form-data';

		return parent::get( $forvalidation );
	}
开发者ID:nerdfiles,项目名称:habari_boilerplate,代码行数:12,代码来源:formui.php

示例8: get

 /**
  * Render this control
  * Ensures that this control has an id property
  * @param Theme $theme The theme used to render the control
  * @return string The HTML output of the control
  */
 public function get(Theme $theme)
 {
     $this->get_id(true);
     $this->set_settings(array('html_value' => json_encode($this->value)));
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:12,代码来源:formcontrolaggregate.php

示例9: get

 public function get(Theme $theme)
 {
     if (isset($this->settings['ajax_url'])) {
         $this->properties['data-autocomplete-config']->ajax_url = $this->settings['ajax_url'];
     }
     if (isset($this->settings['ajax_ishtml'])) {
         $this->properties['data-autocomplete-config']->ajax_ishtml = $this->settings['ajax_ishtml'];
     }
     if (isset($this->settings['allow_new'])) {
         $this->properties['data-autocomplete-config']->tokenSeparators = array(',');
         $this->properties['data-autocomplete-config']->allow_new = true;
     }
     if (isset($this->settings['init_selection'])) {
         $this->properties['data-autocomplete-config']->init_selection = true;
     }
     $this->properties['data-autocomplete-config'] = json_encode($this->properties['data-autocomplete-config']);
     /*
     		Stack::add('template_header_javascript', 'select2' );
     		Stack::add('template_stylesheet', 'select2-css');
     */
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:22,代码来源:formcontrolautocomplete.php

示例10: get

 /**
  * Produce HTML output for all this fieldset and all contained controls
  *
  * @param Theme $theme The theme used to render the controls
  * @return string HTML that will render this control in the form
  */
 function get(Theme $theme)
 {
     if (!isset($this->vars['content'])) {
         $this->vars['content'] = $this->get_contents($theme);
     }
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:13,代码来源:formcontainer.php

示例11: get

 /**
  * Produce HTML output for this static text control.
  *
  * @param Theme $theme The theme used to render this control
  * @return string HTML that will render this control in the form
  */
 public function get(Theme $theme)
 {
     $this->vars['static'] = $this->static;
     return parent::get($theme);
 }
开发者ID:habari,项目名称:system,代码行数:11,代码来源:formcontrolstatic.php

示例12: get

 function get(Theme $theme)
 {
     // Tell the theme what template to render for this control
     $this->set_template('control.customz');
     return parent::get($theme);
 }
开发者ID:habari,项目名称:tests,代码行数:6,代码来源:test_formui.php


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