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