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


PHP FormHelper::text方法代码示例

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


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

示例1: testText

 public function testText()
 {
     //test where valueOrArray is array
     $html = $this->object->text('element', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
     $this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-text'), 'arbitrary' => 'arbitrary', 'type' => 'text'));
     //test where valueOrArray is value
     $html = $this->object->text('element', 'value', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
     $this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-text'), 'value' => 'value', 'arbitrary' => 'arbitrary', 'type' => 'text'));
 }
开发者ID:notzen,项目名称:concrete5-tests,代码行数:9,代码来源:FormHelperTest.php

示例2: t

<?php

$classRequired = $divClassOverride ? $divClassOverride : 'user-or-hash-wrapper';
$form = new FormHelper();
?>
<div class="<?php 
echo $classRequired;
?>
">
  <?php 
echo $form->select('userOrHash[]', $userTimelineOrHashSelectArray, $type);
?>
  <?php 
echo $form->text('userOrHashValue[]', $value, array('style' => 'size:40;'));
?>
  <a class="setting-remove"><img src="<?php 
echo $this->getBlockUrl();
?>
/images/delete.png" alt='<?php 
echo t("delete");
?>
' title='<?php 
echo t("delete");
?>
' width='16' height='16' style='vertical-align: middle;' /></a>
  <?php 
if (false && $lastSetting) {
    ?>
    <a href="#" class="add-timeline-component" id="add-timeline-component-button"><img src="<?php 
    echo $this->getBlockUrl();
    ?>
开发者ID:robchenski,项目名称:ids,代码行数:31,代码来源:hash_or_user_tweetcrete_form_element.php

示例3: array

?>
">
					<label for="alignment">Alignement</label>
					<?php 
echo FormHelper::radios('alignment', array('' => 'Aucun', 'right' => 'Droite', 'center' => 'Centrer', 'left' => 'Gauche'), '');
?>
 
				</div>
	
				<div class="<?php 
echo ++$i % 2 ? 'odd' : 'even';
?>
">
					<label for="link">Lien</label>
					<?php 
echo FormHelper::text('href', '', array('size' => '100'));
?>
<br />
					<?php 
echo FormHelper::checkbox('target', '_blank', '_blank');
?>
 Ouvrir dans une nouvelle fenêtre
				</div>
				</fieldset>	
				
				<div>
					<input class="button" type="submit" value="Insérer dans l'éditeur"> 
					ou
					<a class="cancel" href="<?php 
echo UrlComponent::path(array('action' => 'insertionIndex'));
?>
开发者ID:nicolasmartin,项目名称:framework,代码行数:31,代码来源:insertion-edit.tpl.php

示例4: testInputText

 public function testInputText()
 {
     $this->assertEqual(FormHelper::text('name', 'value', array('class' => 'myClass')), '<input type="text" name="name" class="myClass" value="value" id="name">');
     $this->assertEqual(FormHelper::text('name', $this->Model, array('class' => 'myClass')), '<input type="text" name="name" class="myClass" value="obj" id="name">');
 }
开发者ID:nicolasmartin,项目名称:framework,代码行数:5,代码来源:helper.form.php

示例5: datetime

 static function datetime($name, $value = '', $years = array(), $attributes = array())
 {
     $prefix = '_' . $name . '_';
     $value = is_object($value) ? $value[$name] : $value;
     $date = $time = null;
     $year = $month = $day = null;
     $hour = $minutes = $seconds = null;
     $with_seconds = null;
     if (!$value || $value == 'NOW()' || $value == 'TODAY()') {
         $value = date('Y-m-d H:i:s');
     }
     if (isset($attributes['seconds']) && $attributes['seconds'] == true) {
         $with_seconds = true;
         unset($attributes['seconds']);
     }
     if (@(list($date, $time) = explode(' ', $value))) {
         @(list($year, $month, $day) = explode('-', $date));
         @(list($hour, $minutes, $seconds) = explode(':', $time));
     }
     $html = self::date($name, $value, (array) $years, (array) $attributes);
     $html .= ' ' . __('à') . ' ';
     $html .= FormHelper::text($prefix . 'hour', $hour, array('size' => 2, 'maxlength' => 2));
     $html .= ' : ';
     $html .= FormHelper::text($prefix . 'minutes', $minutes, array('size' => 2, 'maxlength' => 2));
     if ($with_seconds) {
         $html .= ' : ';
         $html .= FormHelper::text($prefix . 'seconds', $seconds, array('size' => 2, 'maxlength' => 2));
     } else {
         $html .= FormHelper::hidden($prefix . 'seconds', $seconds);
     }
     return $html;
 }
开发者ID:nicolasmartin,项目名称:framework,代码行数:32,代码来源:Form.php

示例6: text

 function text($field, $options = array())
 {
     return parent::text($field, $options);
 }
开发者ID:billabong,项目名称:twitter-bootstrap-helper,代码行数:4,代码来源:BootstrapFormHelper.php

示例7: text

 /**
  * Creates a text input widget.
  *
  * @param string $fieldName Name of a field, in the form "Modelname.fieldname"
  * @param array $options Array of HTML attributes.
  * @return string A generated HTML text input element
  * @access public
  * @link http://book.cakephp.org/view/1432/text
  */
 public function text($fieldName, $options = array())
 {
     $options = $this->_addPlaceholder($fieldName, $options);
     return parent::text($fieldName, $options);
 }
开发者ID:novrian,项目名称:BakingPlate,代码行数:14,代码来源:FormPlusHelper.php


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