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


PHP theme::format_value方法代码示例

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


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

示例1: foreach

theme::table_tabs($records['records']);
theme::table_tabs_start();
foreach ($records['records'] as $tab => $tab_records) {
    theme::table_tab_pane_start($tab);
    theme::table_start(['Name', 'Value', 'Managed' => 'text-center', 'Actions' => 'text-center']);
    /* show them in the order they where entered */
    uasort($tab_records, function ($a, $b) {
        return $a->id > $b->id ? 1 : -1;
    });
    foreach ($tab_records as $record) {
        theme::table_start_tr();
        echo !$record->enabled ? '<i class="text-muted">' : '';
        o::e($record->name);
        echo !$record->enabled ? '</i>' : '';
        theme::table_row();
        echo theme::format_value($record->value, 128);
        theme::table_row('larger text-center');
        echo theme::enum_icon((int) $record->managed);
        theme::table_row('actions text-center');
        if ($record->is_editable) {
            theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
        }
        if (has_access('orange::advanced settings')) {
            theme::table_action('pencil-square', $this->controller_path . '/edit/' . $record->id . '/advanced');
        }
        if ($record->is_deletable) {
            o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id);
        }
        theme::table_end_tr();
    }
    theme::table_end();
开发者ID:galdiolo,项目名称:theme-orange,代码行数:31,代码来源:index.php

示例2: looper

 public static function looper($all, $which)
 {
     $overridden_icon = '<i class="fa fa-exchange"></i>';
     $controller_path = ci()->page->data('controller_path');
     $inp = $all[$which];
     if (count($inp) > 0) {
         echo '<table class="table table-condensed" style="margin:0">';
         foreach ($inp as $name => $value) {
             $show_as = 0;
             /* text area default */
             $overridden = '&nbsp;';
             $link = '&nbsp;';
             switch ($which) {
                 case 'db':
                     if ($all['db'][$name] != $all['env'][$name] && isset($all['env'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     if ($all['db'][$name] != $all['file'][$name] && isset($all['db'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     break;
                 case 'env':
                     if ($all['env'][$name] != $all['file'][$name] && isset($all['file'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     break;
                 case 'file':
                     if ($all['file'][$name] != $all['env'][$name] && isset($all['env'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     break;
             }
             $group = ci()->uri->segment(5);
             switch (gettype($value)) {
                 case 'string':
                 case 'integer':
                 case 'null':
                 case 'float':
                     break;
                 case 'boolean':
                     $show_as = 1;
                     /* true / false radio's */
                     break;
             }
             if (!ci()->o_setting_model->compound_key_exists($name, $group) && $which == 'merged') {
                 $hash = bin2hex($name . chr(0) . convert_to_string($value) . chr(0) . $group . chr(0) . $show_as);
                 $link = '<a class="js-add-link" href="' . $controller_path . '/add/' . $hash . '"><i class="fa fa-plus-square"></i></a>';
             }
             echo '<tr>';
             echo '<td width="47%">' . $name . '&nbsp;</td>';
             echo '<td style="width:47%;">' . theme::format_value($value) . '</td>';
             echo '<td style="width:3%; text-align:center">' . $link . '</td>';
             echo '<td style="width:3%; text-align:center">' . $overridden . '</td>';
             echo '</tr>';
         }
         echo '</table>';
     }
 }
开发者ID:dmyers2004,项目名称:theme-orange,代码行数:58,代码来源:SettingController.php


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