本文整理汇总了PHP中Q_Html::id方法的典型用法代码示例。如果您正苦于以下问题:PHP Q_Html::id方法的具体用法?PHP Q_Html::id怎么用?PHP Q_Html::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q_Html
的用法示例。
在下文中一共展示了Q_Html::id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Q_before_Q_tool_render
function Q_before_Q_tool_render($params, &$result)
{
$info = $params['info'];
$extra = $params['extra'];
if (is_string($extra) or is_numeric($extra)) {
$extra_id = $extra;
$extra = array();
} else {
$extra_id = isset($extra['id']) ? $extra['id'] : '';
}
$cur_prefix = isset($extra['prefix']) ? $extra['prefix'] : Q_Html::getIdPrefix();
$tool_ids = array();
$tool_prefixes = array();
foreach ($info as $name => $options) {
$tool_id = Q_Html::id($name . ($extra_id === '' ? '' : "-{$extra_id}"), $cur_prefix);
$tool_ids[$name] = $tool_id;
$tool_prefix = $tool_id . '_';
if (isset(Q::$toolWasRendered[$tool_prefix])) {
trigger_error("A tool with prefix \"{$tool_prefix}\" was already rendered.", E_USER_NOTICE);
}
Q::$toolWasRendered[$tool_prefix] = true;
$tool_prefixes[$name] = $tool_prefix;
}
$prev_prefix = Q_Html::pushIdPrefix($tool_prefixes, $tool_ids);
}
示例2: array
</tr>
<tr>
<td class="Q_field_title">
<label for="<?php
echo $prefix;
?>
birthday">Birthday</label>
<?php
if ($showAccess) {
?>
<?php
echo Q::tool('Streams/access', array('readLevel' => Streams::my('Streams/user/birthday', 'readLevel'), 'streamName' => 'Streams/user/birthday', 'input_id' => Q_Html::id('birthday_readLevel')), 'birthday');
?>
<input type="hidden" name="birthday_readLevel"
id="<?php
echo Q_Html::id('birthday_readLevel');
?>
"
value="<?php
echo Streams::my('Streams/user/birthday', 'readLevel');
?>
">
<?php
}
?>
</td>
<td class="Q_field_input">
<?php
echo Q_Html::date('birthday', Streams::my('Streams/user/birthday'), array('year_from' => 1900, 'year_to' => '2001'), array('id' => 'birthday'));
?>