You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
796 B
PHP

<?php
namespace App\ClassLib;
class MiscLib
{
public static function getDateTime()
{
return date('Y-m-d H:i:s');
}
public static function adminLTETableTemplate()
{
$template = [
'table_open' => '<table class="table table-head-fixed table-hover text-nowrap">'
];
return $template;
}
public static function adminLTEDataTableTemplate($tableID)
{
$template = [
'table_open' => '<table id="'.$tableID.'" class="table table-bordered table-striped">'
];
return $template;
}
public static function searchFromAsocArray($column, $value, $data)
{
$key = array_search($value, array_column($data, $column));
return ($key !== false) ? $data[$key] : null;
}
}