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


PHP Util_Ui::checkbox方法代码示例

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


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

示例1: __

<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<tr>
    <th colspan="2">
        <?php 
$c = Dispatcher::config();
$is_pro = Util_Environment::is_w3tc_pro($c);
$key = 'stats.enabled';
$value = $c->get($key);
if (!$is_pro) {
    $value = false;
}
$name = Util_Ui::config_key_to_http_name($key);
Util_Ui::checkbox($key, $name, $value, $c->is_sealed('common.') || !$is_pro, __('Enable caching statistics (on dashboard)', 'w3-total-cache'));
if (!$is_pro) {
    echo ' (Available after <a href="#" class="button-buy-plugin">upgrade</a>)';
}
?>
    </th>
</tr>
<?php 
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:27,代码来源:UsageStatistics_View_General.php

示例2:

<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<tr>
    <th colspan="2">
        <?php 
$key = 'stats.enabled';
$c = Dispatcher::config();
$value = $c->get($key);
$label = Util_Ui::config_label($key);
$name = Util_Ui::config_key_to_http_name($key);
Util_Ui::checkbox($key, $name, $value, $c->is_sealed('common.'), $label);
?>
    </th>
</tr>
<?php 
开发者ID:eduardodomingos,项目名称:eduardodomingos.com,代码行数:21,代码来源:UsageStatistics_View_General.php

示例3:

    </table>
    <?php 
Util_Ui::button_config_save('extension_newrelic_dashboard');
?>
    <?php 
Util_Ui::postbox_footer();
?>

    <?php 
Util_Ui::postbox_header(__('Behavior Settings', 'w3-total-cache'), '', 'behavior');
?>
    <table  class="form-table">
        <tr>
            <th colspan="2">
                <?php 
Util_Ui::checkbox('', Util_Ui::config_key_to_http_name(array('newrelic', 'accept.logged_roles')), $config->get_boolean(array('newrelic', 'accept.logged_roles')), $config->is_sealed('newrelic'));
_e('Use <acronym title="Real User Monitoring">RUM</acronym> only for following user roles', 'w3-total-cache');
?>
</label><br />
                <span class="description"><?php 
_e('Select user roles that <acronym title="Real User Monitoring">RUM</acronym> should be enabled for:', 'w3-total-cache');
?>
</span>

                <div id="newrelic_accept_roles">
                    <?php 
$saved_roles = $config->get_array(array('newrelic', 'accept.roles'));
?>
                    <input type="hidden" name="newrelic___accept__roles" value="" /><br />
                    <?php 
foreach (get_editable_roles() as $role_name => $role_data) {
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:31,代码来源:Extension_NewRelic_Page_View_Apm.php

示例4: table_tr

 /**
  * Renders <tr> element with controls
  * id =>
  * label =>
  * label_class =>
  * <control> => details
  * style - default is label,controls view,
  *         alternative is one-column view
  */
 public static function table_tr($a)
 {
     $id = isset($a['id']) ? $a['id'] : '';
     $a = apply_filters('w3tc_ui_settings_item', $a);
     if (isset($a['style'])) {
         echo '<tr><th colspan="2"';
     } else {
         echo '<tr><th';
         if (isset($a['label_class'])) {
             echo ' class="' . $a['label_class'] . '"';
         }
         echo '>';
         if (isset($a['label'])) {
             Util_Ui::label($id, $a['label']);
         }
         echo "</th>\n<td>\n";
     }
     foreach ($a as $key => $e) {
         if ($key == 'checkbox') {
             Util_Ui::checkbox($id, isset($e['name']) ? $e['name'] : null, $e['value'], isset($e['disabled']) ? $e['disabled'] : false, isset($e['label']) ? $e['label'] : null);
         } elseif ($key == 'description') {
             echo '<br /><span class="description">' . $e . '</span>';
         } elseif ($key == 'hidden') {
             Util_Ui::hidden('', $e['name'], $e['value']);
         } elseif ($key == 'html') {
             echo $e;
         } elseif ($key == 'radiogroup') {
             Util_Ui::radiogroup($e['name'], $e['value'], $e['values']);
         } elseif ($key == 'selectbox') {
             Util_Ui::selectbox($id, $e['name'], $e['value'], $e['values'], isset($e['disabled']) ? $e['disabled'] : false, isset($e['optgroups']) ? $e['optgroups'] : null);
         } elseif ($key == 'textbox') {
             Util_Ui::textbox($id, $e['name'], $e['value'], isset($e['disabled']) ? $e['disabled'] : false, !empty($e['size']) ? $e['size'] : 20);
         } elseif ($key == 'textarea') {
             Util_Ui::textarea($id, $e['name'], $e['value'], isset($e['disabled']) ? $e['disabled'] : false);
         }
     }
     if (isset($a['style'])) {
         echo "</th>";
     } else {
         echo "</td>";
     }
     echo "</tr>\n";
 }
开发者ID:developmentDM2,项目名称:Whohaha,代码行数:52,代码来源:Util_Ui.php


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