fridge_bites/apps/Admin/Controllers/AdminBanListController.php
2025-06-02 13:34:17 +02:00

32 lines
849 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace Lycoreco\Apps\Admin\Controllers;
class AdminBanListController extends Abstract\AdminListController
{
protected $model_сlass_name = "Lycoreco\Apps\Users\Models\BanlistModel";
protected $table_fields = array(
'Reason' => 'field_reason',
'Created at' => 'field_created_at',
'End at' => 'field_end_at',
'Active?' => 'is_active()',
);
protected $single_router_name = 'admin:ban';
protected $verbose_name = "ban";
protected $verbose_name_multiply = "banlist";
protected $sort_by = ['-obj.end_at'];
public function custom_filter_fields()
{
$user_id = $this->url_context['url_1'];
return array(
[
'name' => 'obj.user_id',
'type' => '=',
'value' => $user_id
]
);
}
}