本文整理汇总了PHP中UI::getButton方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::getButton方法的具体用法?PHP UI::getButton怎么用?PHP UI::getButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI::getButton方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showButtonMode
public static function showButtonMode($mode, $key = null, $edited = false)
{
$str = '';
if ($mode === 'lst' || $mode === 'index' || $mode === 'daftar') {
$str .= UI::getButton('add');
$str .= UI::getButton('reset');
return $str;
}
if ($mode === 'oneedit') {
$str .= UI::getButton('detail', $key);
return $str;
}
if ($mode === 'onedetail') {
$str .= UI::getButton('edit', $key);
return $str;
}
if ($mode === 'edit') {
//$str .= UI::getButton('save');
//$str .= UI::getButton('batal', $key);
$str .= UI::getButton('add');
$str .= UI::getButton('lst');
return $str;
}
if ($mode === 'add') {
//$str .= UI::getButton('save');
$str .= UI::getButton('lst');
return $str;
}
if ($mode === 'detail') {
$str .= UI::getButton('edit', $key);
$str .= UI::getButton('delete', $key);
$str .= UI::getButton('add');
$str .= UI::getButton('lst');
return $str;
}
if ($mode === 'save' && $edited) {
$str .= UI::getButton('save');
$str .= UI::getButton('batal', $key);
return $str;
}
}
示例2: foreach
echo "<tr>";
echo "<td>{$i}</td>";
foreach ($header as $rows1) {
$val = $rows[$rows1['name']];
if ($rows1['name'] == 'id_member') {
echo "<td><a href='" . ($url = URL::Base($page_ctrl . "/detail/{$rows[$pk]}")) . "'>{$val}</a></td>";
} else {
switch ($rows1['type']) {
case 'list':
echo "<td>" . $rows1["value"][$val] . "</td>";
break;
case 'date':
echo "<td>" . Eng2Ind($val) . "</td>";
break;
default:
echo "<td>{$val}</td>";
break;
}
}
}
echo "<td style='text-align:right'>\r\n \t" . UI::getButton('edit', $rows[$pk], 'class="btn btn-xs btn-warning"') . "\r\n\t\t" . UI::getButton('delete', $rows[$pk], 'class="btn btn-xs btn-danger"') . "\r\n \t</td>";
echo "</tr>";
}
if (!count($list['rows'])) {
echo "<tr><td colspan='" . (count($header) + 2) . "'>Data kosong</td></tr>";
}
?>
</tbody>
</table>
<?php
echo UI::showPaging($paging, $page, $limit_arr, $limit, $list);
示例3: showButtonMode
public static function showButtonMode($mode, $key = null, $edited = false, $add = '', $class = 'btn-sm')
{
$kg = get_instance();
$str = '';
if (count($kg->addbuttons)) {
foreach ($kg->addbuttons as $key => $value) {
$str .= UI::getButton($value, null, $add, $class);
}
}
if (count($kg->buttons)) {
foreach ($kg->buttons as $key => $value) {
$str .= UI::getButton($value, null, $add, $class);
}
return $str;
}
if ($mode === 'lst' || $mode === 'index' || $mode === 'daftar') {
$str .= UI::getButton('add', null, $add, $class);
$str .= UI::getButton('reset', null, $add, $class);
return $str;
}
if ($mode === 'oneedit') {
$str .= UI::getButton('detail', $key, $add, $class);
return $str;
}
if ($mode === 'onedetail') {
$str .= UI::getButton('edit', $key, $add, $class);
return $str;
}
if ($mode === 'edit') {
//$str .= UI::getButton('save');
//$str .= UI::getButton('batal', $key);
$str .= UI::getButton('add', null, $add, $class);
$str .= UI::getButton('lst', null, $add, $class);
return $str;
}
if ($mode === 'add') {
//$str .= UI::getButton('save');
$str .= UI::getButton('lst', null, $add, $class);
return $str;
}
if ($mode === 'detail') {
$str .= UI::getButton('edit', $key, $add, $class);
$str .= UI::getButton('delete', $key, $add, $class);
$str .= UI::getButton('add', null, $add, $class);
$str .= UI::getButton('lst', null, $add, $class);
return $str;
}
if ($mode === 'save' && $edited) {
$str .= UI::getButton('save', null, $add, $class);
$str .= UI::getButton('batal', $key, $add, $class);
return $str;
}
}