CoolCMS API

SaveTrait

Generic mapper `save()` and `updateColumns()`: extracts the entity with the hydrator, delegates to the repository (bridge POST) and applies the identity back on success.

It is not tied to a module (Front/Admin), so both bridge stacks share it.

Table of Contents

Methods

save()  : Result
updateColumns()  : Result

Methods

save()

public save(BaseEntity $entity[, array<string, mixed> $meta = [] ][, array<int, string> $skipFields = [] ]) : Result
Parameters
$entity : BaseEntity
$meta : array<string, mixed> = []
$skipFields : array<int, string> = []
Return values
Result

updateColumns()

public updateColumns(array<string|int, mixed> $ids, array<string, mixed> $values) : Result
Parameters
$ids : array<string|int, mixed>

ids or composite-id arrays

$values : array<string, mixed>

property name => new value

Return values
Result
On this page

Search results