Documentation

WriteTrait

Table of Contents

Properties

$actorPassword  : string
If given, this is checked against the current user's password before the change is allowed.

Methods

getUnpermittedFields()  : array<string|int, mixed>
Get fields the logged in user is not permitted to act on.
formatWriteValues()  : mixed
At this point we don't have the records we're going to update, we just have the API values we're going to SET on (each) record that gets processed.
validateValues()  : mixed
This is called with the values for a record fully loaded.
write()  : array<string|int, CRM_Core_DAO>
Overrideable function to save items using the appropriate BAO function

Properties

$actorPassword

If given, this is checked against the current user's password before the change is allowed.

protected string $actorPassword

Methods

getUnpermittedFields()

Get fields the logged in user is not permitted to act on.

public getUnpermittedFields() : array<string|int, mixed>

Override parent to implement custom handling.

Return values
array<string|int, mixed>

formatWriteValues()

At this point we don't have the records we're going to update, we just have the API values we're going to SET on (each) record that gets processed.

protected formatWriteValues(array<string|int, mixed> &$record) : mixed

We can do some basic checks.

Do most of our complex permissions checks here.

Parameters
$record : array<string|int, mixed>
Tags
throws
CRM_Core_Exception

validateValues()

This is called with the values for a record fully loaded.

protected validateValues() : mixed

Note that we will now have hashed_password, as well as possibly password.

write()

Overrideable function to save items using the appropriate BAO function

protected write(array<string|int, array<string|int, mixed>> $items) : array<string|int, CRM_Core_DAO>
Parameters
$items : array<string|int, array<string|int, mixed>>

Items already formatted by self::writeObjects

Return values
array<string|int, CRM_Core_DAO>

Array of saved DAO records


        
On this page

Search results