trafficmonitor init...1
This commit is contained in:
parent
702d25b1be
commit
81a3951f6b
@ -10,4 +10,27 @@ class TrafficHelper extends CommonHelper
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'dashboard':
|
||||
$action = form_label(
|
||||
$label ? $label : ICONS['SEARCH'],
|
||||
$action,
|
||||
[
|
||||
"data-src" => current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK() . '?' . $viewDatas['uri']->getQuery(),
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "btn btn-sm btn-primary form-label-sm",
|
||||
...$extras
|
||||
]
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
break;
|
||||
}
|
||||
return $action;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user