CoolCMS API

DeleteTrait

Table of Contents

Methods

actionDelete()  : void
actionDeleteAll()  : void
internalActionDelete()  : array<string, mixed>
internalActionDeleteAll()  : array<string, mixed>
normalizeDeleteId()  : int|array<int, int>|null
Normalizes the id: `'5'` to `5`; `['1','2']` to `[1, 2]`; `'abc'`, `''`, `[]`, `0` and `null` to `null`.

Methods

internalActionDelete()

public internalActionDelete(int|array<string|int, mixed> $id) : array<string, mixed>
Parameters
$id : int|array<string|int, mixed>

one id or an array of ids (bulk delete)

Return values
array<string, mixed> —

response envelope

internalActionDeleteAll()

public internalActionDeleteAll([array<string|int, Filter|array<string, mixed>> $filters = [] ]) : array<string, mixed>
Parameters
$filters : array<string|int, Filter|array<string, mixed>> = []
Return values
array<string, mixed> —

response envelope

normalizeDeleteId()

Normalizes the id: `'5'` to `5`; `['1','2']` to `[1, 2]`; `'abc'`, `''`, `[]`, `0` and `null` to `null`.

private normalizeDeleteId(mixed $id) : int|array<int, int>|null
Parameters
$id : mixed
Return values
int|array<int, int>|null
On this page

Search results