public function getActionButtons() { $buttons = parent::getActionButtons(); if (isset($buttons['Удалить'])) { unset($buttons['Удалить']); } return $buttons; }
public function getActionButtons() { $buttons = parent::getActionButtons(); $ref = urlencode(AdminHREF::getFullCurrentHREF()); $changePass = function ($row) use($ref) { $href = AdminHREF::getDefaultAdminRouteUri('dataEdit', 'UsersPasswords', $row['id']) . '/?ref=' . $ref; $text = '<i class="fa fa-lock gc"></i>'; return '<a title="Сменить пароль" href="' . $href . '">' . $text . '</a>'; }; $changeRoles = function ($row) use($ref) { $href = AdminHREF::getDefaultAdminRouteUri('dataEdit', 'UsersRoles', $row['id']) . '/?ref=' . $ref; $text = '<i class="fa fa-user-secret gc"></i>'; return '<a title="Роли пользователя" href="' . $href . '">' . $text . '</a>'; }; $loginUser = function ($row) use($ref) { $href = AdminHREF::getDefaultAdminRouteUri('loginuser', 'users', $row['id']); $text = '<i class="fa fa-sign-in gc"></i>'; return '<a title="Войти от имени пользователя" href="' . $href . '">' . $text . '</a>'; }; $buttons['Роли пользователя'] = $changeRoles; $buttons['Сменить пароль'] = $changePass; $buttons['Войти'] = $loginUser; return $buttons; }