當前位置: 首頁>>代碼示例>>PHP>>正文


PHP theme::shorten方法代碼示例

本文整理匯總了PHP中theme::shorten方法的典型用法代碼示例。如果您正苦於以下問題:PHP theme::shorten方法的具體用法?PHP theme::shorten怎麽用?PHP theme::shorten使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在theme的用法示例。


在下文中一共展示了theme::shorten方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

<?php

theme::header_start($controller_titles, 'manage random bits of text.');
Plugin_search_sort::field();
if (has_access('Snippets::Add Snippets')) {
    theme::header_button('new');
}
theme::header_end();
theme::table_start(['Name', 'Value', 'Note', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::e($record->name);
    theme::table_row();
    theme::shorten($record->value);
    theme::table_row();
    theme::shorten($record->note);
    theme::table_row('actions text-center');
    if ($record->is_editable && has_access('Snippets::Edit Snippets')) {
        theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    }
    if ($record->is_deletable && has_access('Snippets::Delete Snippets')) {
        o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id);
    }
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
開發者ID:ProjectOrangeBox,項目名稱:snippet,代碼行數:27,代碼來源:index.php

示例2: strtolower

<?php

theme::header_start($controller_titles, 'Manage ' . strtolower($controller_titles) . '.');
Plugin_search_sort::field();
if (has_access('Content::Add Pages')) {
    theme::header_button('new');
}
theme::header_end();
theme::table_start(['Title', 'Internal', 'Is Visible' => 'text-center', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::e($record->title);
    theme::table_row();
    theme::shorten($record->internal);
    theme::table_row('text-center');
    theme::enum_icon($record->is_visible);
    theme::table_row('actions text-center');
    if ($record->is_editable) {
        theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    }
    if ($record->is_deletable && has_access('Pages::Delete Pages')) {
        o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id);
    }
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
開發者ID:ProjectOrangeBox,項目名稱:cms-content,代碼行數:27,代碼來源:index.php

示例3: foreach

<?php

theme::header_start('Lock Settings', 'protect the following records form accidental import updates.');
Plugin_search_sort::field();
theme::header_button('back', ['href' => $controller_path]);
theme::header_end();
theme::table_start(['Group', 'Name', 'Value', 'Locked' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::e($record->group);
    theme::table_row();
    theme::e($record->name);
    theme::table_row();
    theme::shorten($record->value, 64);
    //theme::smart_model('o_access',$record->access_id,'key');
    theme::table_row('text-center');
    $checked = $record->is_locked ? 'checked' : '';
    echo '<input type="checkbox" value="1" class="select" data-id="' . $record->id . '" data-m="0" ' . $checked . '>';
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
開發者ID:ProjectOrangeBox,項目名稱:orange-export-import,代碼行數:22,代碼來源:settings.php

示例4: foreach

<?php

theme::header_start('Manage Zones');
theme::header_button('new');
theme::header_end();
theme::table_start(['Name', 'Description', 'Active' => 'txt-ac', 'Actions' => 'txt-ac'], null, $records);
foreach ($records as $record) {
    $record->id = $record->lzone_id;
    theme::table_start_tr();
    theme::e($record->lzone_name);
    theme::table_row();
    theme::shorten($record->lzone_description);
    theme::table_row('txt-ac');
    theme::enum_icon($record->lzone_status);
    theme::table_row('actions txt-ac');
    theme::table_action('edit', $this->controller_path . '/edit/' . $record->lzone_id);
    o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->lzone_id);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
開發者ID:ProjectOrangeBox,項目名稱:flexi-cart,代碼行數:21,代碼來源:index.php


注:本文中的theme::shorten方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。