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


PHP FormHelper::radioYesNo方法代码示例

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


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

示例1: outputFormat

    function outputFormat()
    {
        App::import('Helper', array('form', 'html'));
        $Form = new FormHelper();
        $Form->Html = new HtmlHelper();
        switch ($this->type) {
            case 'relatedlisting':
                if (!isset($this->params->output_format) || $this->params->output_format == '') {
                    echo '<a href="{OPTIONVALUE}">{FIELDTEXT}</a>';
                } else {
                    echo $this->params->output_format;
                }
                break;
            case 'website':
                if (!isset($this->params->output_format) || $this->params->output_format == '') {
                    echo '<a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a>';
                } else {
                    echo $this->params->output_format;
                }
                break;
            default:
                $format = $this->params->output_format == '' ? '{FIELDTEXT}' : $this->params->output_format;
                ?>
				<table class="admin_list">
                    <tr>
					    <td>         
						    <strong>Output Format:</strong>&nbsp;-&nbsp;Enter any text and valid tags: {TITLE},{SECTION},{CATEGORY},{FIELDTEXT},{FIELDTITLE},{JR_NAME}<= will not work for select multiple or checkboxes.
						    <br />The {OPTIONVALUE} tag can also be used for select lists, checkboxes and radiobuttons
						    <br /><textarea class="outputformat" id="params[output_format]" name="data[Field][params][output_format]"><?php 
                echo $format;
                ?>
</textarea>
	                         <br />
                        </td>
                    </tr> 
                    <tr>
                        <td>
                             <strong>Apply Output Format Before Click2Search:</strong> 
                             <?php 
                echo $Form->radioYesNo("data[Field][params][formatbeforeclick]", "", Sanitize::getInt($this->params, 'formatbeforeclick', 0));
                ?>
                        </td>
                    </tr>
                </table>  
			<?php 
                break;
        }
    }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:48,代码来源:admin_fields.php

示例2: outputFormat

    function outputFormat()
    {
        App::import('Helper', array('form', 'html'));
        $Form = new FormHelper();
        $Form->Html = new HtmlHelper();
        switch ($this->type) {
            case 'relatedlisting':
                if (!isset($this->params->output_format) || $this->params->output_format == '') {
                    echo '<a href="{OPTIONVALUE}">{FIELDTEXT}</a>';
                } else {
                    echo $this->params->output_format;
                }
                break;
            case 'website':
                if (!isset($this->params->output_format) || $this->params->output_format == '') {
                    echo '<a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a>';
                } else {
                    echo $this->params->output_format;
                }
                break;
            default:
                $format = $this->params->output_format == '' ? '{FIELDTEXT}' : $this->params->output_format;
                ?>
				<table class="admin_list">
                    <tr>
					    <td>         
                            <strong>Output Format:</strong> Enter any text and valid tags: {title}, {section}, {category}, {fieldtext}, {fieldtitle}, {jr_fieldname}. If you want the value of the field without the outputformat or click2search then use {jr_fieldname|value}.
						    . The {optionvalue} tag can also be used for select lists, checkboxes and radiobuttons
						    <br /><textarea class="outputformat" id="params[output_format]" name="data[Field][params][output_format]"><?php 
                echo $format;
                ?>
</textarea>
	                         <br />
                        </td>
                    </tr> 
                    <tr>
                        <td>
                             <strong>Apply Output Format Before Click2Search:</strong> 
                             <?php 
                echo $Form->radioYesNo("data[Field][params][formatbeforeclick]", "", Sanitize::getInt($this->params, 'formatbeforeclick', 0));
                ?>
                        </td>
                    </tr>
                </table>  
			<?php 
                break;
        }
    }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:48,代码来源:admin_fields.php


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