本文整理汇总了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> - 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;
}
}
示例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;
}
}