Skip to content

Branches

Branches control levels of user navigation. The top branch is the trunk. Main branches extend to multiple branches like a tree. Within each branch, keys are used to remember and control events and statuses.

Keys

Here is a key representing a lead record. The key name is lead_form1 and a subkey is established called call_form1 to be user to link a timeline record to the lead. The ID of the lead record is set by

$formKey = branch_key('lead_form1', [
    'call_form1' => []
])->dbConfigExtra('leads');

Subkeys

A subkey is a named key within a key. It is stored separately but linked to a key by name.

Here is a subkey that creates a timeline record linked to a parent record.

$eventKey = $formKey->getSubkey('call_form1')->dbConfigExtra('timeline')->linkRecord([
    'entry' => ['TZ_TIMESTAMP'],
    'updated' => ['TZ_TIMESTAMP'],
]);