php ProcessWire管理数据表
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php ProcessWire管理数据表相关的知识,希望对你有一定的参考价值。
<?php
//
// Admin Data Table
//
$table = $this->modules->get('MarkupAdminDataTable');
$table->set("encodeEntities", false);
$table->set("sortable", true);
$table->set("resizable", false);
$table->set("class", "transations-data-table");
$table->set("id", "transations-data-table");
$table->set("caption", "Transactions List");
// Table Heading
$table->headerRow([
'Link',
'Class',
'String'
]);
// Table Data
foreach($items as $item) {
//Add Row
$table->row(
[
$link => "http://www.github.com", // <td> link
[$class, "uk-text-small"], // <td> class
$string, // <td> string
],
[
"class" => $item->isUnpublished() ? "is-unpublished" : "", // <tr> class
"attrs" => ["data-id" => "$item->id"] ,// <tr> attr
],
);
}
if($items->count < 1) {
$table->row([
["No items to display", "uk-h4 uk-padding uk-margin-remove"]
]);
}
echo $table->render();
以上是关于php ProcessWire管理数据表的主要内容,如果未能解决你的问题,请参考以下文章
php Processwire clean-files.php
php ProcessWire Mail
php Processwire更改页面创建日期
php Processwire页面URL挂钩
php Processwire表格
php Processwire Google Analytics跟踪