33 lines
959 B
PHP
33 lines
959 B
PHP
<?php
|
|
|
|
namespace App\Helpers\Part;
|
|
|
|
class RAMHelper extends PartHelper
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
|
|
{
|
|
switch ($action) {
|
|
case 'modify':
|
|
$action = form_label(
|
|
$label,
|
|
'ram_modify',
|
|
[
|
|
"data-src" => "admin/part/ram/modify/{$viewDatas['entity']->getPK()}",
|
|
"data-bs-toggle" => "modal",
|
|
"data-bs-target" => "#modal_action_form",
|
|
"class" => "text-primary form-label-sm",
|
|
]
|
|
);
|
|
break;
|
|
default:
|
|
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
|
break;
|
|
}
|
|
return $action;
|
|
}
|
|
}
|