| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class FormIgnoreDelete extends Model |
||
| 14 | { |
||
| 15 | public $id; |
||
| 16 | |||
| 17 | private $_user; |
||
| 18 | private $_target_id; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * FormIgnoreDelete constructor. Pass current user object and target user id inside |
||
| 22 | * @param iUser $user |
||
| 23 | * @param int $target_id |
||
| 24 | */ |
||
| 25 | public function __construct(iUser $user, $target_id) |
||
| 26 | { |
||
| 27 | $this->_user = $user; |
||
| 28 | $this->_target_id = $target_id; |
||
| 29 | parent::__construct(true); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Set public display data |
||
| 34 | */ |
||
| 35 | public function before() |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Display labels in form |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function labels(): array |
||
| 45 | { |
||
| 46 | return [ |
||
| 47 | 'id' => __('User ID'), |
||
| 48 | 'name' => __('Nickname') |
||
| 49 | ]; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Form submit action - delete user from database |
||
| 54 | * @throws \Exception |
||
| 55 | */ |
||
| 56 | public function make() |
||
| 61 | } |
||
| 62 | } |
||
| 63 |