\Drupal\strata\Form CaptureSettingsForm

Which realms are captured, and how the one that dominates the volume is treated.

The access-churn choice is the largest single lever on what a site stores, so it is a radio group with its measured consequence written next to each option rather than a checkbox. Two thirds of a Drupal site's write volume is users_field_data.access and login timestamp churn: core writes access whenever the request is more than session_write_interval seconds newer than the last one, which defaults to 180.

Turning it off costs MORE than recording a compact event, which is the result an operator would never guess. Dropping the operation leaves the row dirty, and the reconciler then picks it up on cron at the full price of a field delta.

The raw SQL tap is offered with the measured overhead, because it is the one capture source that costs something on every request rather than only when something changes.

Summary

Methods
Properties
Constants
getFormId
buildForm
create
submitForm
No public properties found
SETTINGS
settingKeys
getEditableConfigNames
fieldFor
setting
coerce
engine
No protected constants found
addAccessChurn
addStatements
addAssurance
realmNote
No private properties found
No private constants found

Constant

SETTINGS

SETTINGS = 'strata.settings'

The configuration object every settings form edits.

Properties

$engine

$engine : ?\Drupal\strata\Engine

The engine, reset after a save.

Type

Engine|null

Methods

getFormId()

getFormId() : string

{@inheritdoc}

Returns

string —

buildForm()

buildForm(array  $form, \Drupal\Core\Form\FormStateInterface  $form_state) : array

{@inheritdoc}

Parameters

array $form
\Drupal\Core\Form\FormStateInterface $form_state

Returns

array —

create()

create(\Symfony\Component\DependencyInjection\ContainerInterface  $container) : static

{@inheritdoc}

The engine is asked for, never required. composer.json PSR-4 maps Drupal\strata\ onto src/, so every class here loads off composer's autoloader whether or not the module is in core.extension, while strata.services.yml reaches the container only when it is. A router table still holding this route after the module left - a failed install, a composer remove with no uninstall - therefore resolves the class, calls this, and answered 500 with ServiceNotFoundException until 1.0.3. The property is nullable and every use of it is null-safe, so asking is the whole fix.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container

Returns

static —

submitForm()

submitForm(array  $form, \Drupal\Core\Form\FormStateInterface  $form_state) : void

{@inheritdoc}

Parameters

array $form
\Drupal\Core\Form\FormStateInterface $form_state

Returns

void —

settingKeys()

settingKeys() : array<string,string>

The settings this form owns, keyed to their type.

Returns

array

Dotted config key keyed to one of "string", "int", "float" or "bool".

getEditableConfigNames()

getEditableConfigNames() : list<string>

{@inheritdoc}

Returns

list

The configuration this form edits.

fieldFor()

fieldFor(string  $key) : string

The form field a config key is edited by.

Dots are not valid in a form element name, so a nested key is rendered under a flattened one.

Parameters

string $key

The dotted config key.

Returns

string —

The form field name.

setting()

setting(string  $key, mixed  $default = null) : mixed

One current setting.

Parameters

string $key

The dotted config key.

mixed $default

What to return when nothing is configured.

Returns

mixed —

The configured value.

coerce()

coerce(mixed  $value, string  $type) : mixed

Coerces a submitted value to the type the config schema declares.

A form always submits strings, and configuration is schema-validated on save, so an integer setting handed the string "15" fails validation on a site running strictConfigSchema.

Parameters

mixed $value

The submitted value.

string $type

One of "string", "int", "float" or "bool".

Returns

mixed —

The coerced value.

addAccessChurn()

addAccessChurn(array  $form) : void

The access-churn mode, with what each one costs.

Parameters

array $form

The form, added to by reference.

Returns

void —

addStatements()

addStatements(array  $form) : void

The raw SQL tap, with its measured cost.

Parameters

array $form

The form, added to by reference.

Returns

void —

addAssurance()

addAssurance(array  $form) : void

The passes that check the capture is working.

Parameters

array $form

The form, added to by reference.

Returns

void —

realmNote()

realmNote(\Drupal\strata\Journal\Realm  $realm) : string

What an operator needs to know about one realm before switching it on.

Parameters

\Drupal\strata\Journal\Realm $realm

The realm.

Returns

string —

The note, empty when the realm needs none.