FluentAdminTrait
trait FluentAdminTrait (View source)
Decorates admin areas for localised items with extra actions.
Methods
Decorate actions with fluent-specific details
Update save action based on localisation state valid states:
- localised (localise label)
- not localised (save label)
Update delete action based on localisation state valid states:
- localised more than one locale (unlocalise label)
- localised in one locale (delete label)
- not localised (remove the action)
Information panel shows published state of a base record by default this overrides the display with the published state of the localised record
Details
abstract HTTPResponse|string|DBHTMLText
actionComplete(Form $form, string $message)
No description
protected
updateFluentActions(FieldList $actions, DataObject $record)
Decorate actions with fluent-specific details
mixed
clearFluent(array $data, Form $form)
No description
mixed
copyFluent(array $data, Form $form)
Copy this record to other localisations (not published)
mixed
unpublishFluent(array $data, Form $form)
Unpublishes the current object from all locales
mixed
archiveFluent(array $data, Form $form)
Archives the current object from all locales (versioned)
mixed
deleteFluent(array $data, Form $form)
Delete the current object from all locales (non-versioned)
mixed
publishFluent(array $data, Form $form)
No description
mixed
showFluent(array $data, Form $form)
No description
mixed
hideFluent(array $data, Form $form)
No description
protected
inEveryLocale(callable $doSomething)
Do an action in every locale
protected
inEveryStage(callable $doSomething)
Do an action in every stage (Live first)
protected void
updateSaveAction(FieldList $actions, DataObject $record)
Update save action based on localisation state valid states:
- localised (localise label)
- not localised (save label)
protected void
updateDeleteAction(FieldList $actions, DataObject $record)
Update delete action based on localisation state valid states:
- localised more than one locale (unlocalise label)
- localised in one locale (delete label)
- not localised (remove the action)
protected void
updateInformationPanel(FieldList $actions, DataObject $record)
Information panel shows published state of a base record by default this overrides the display with the published state of the localised record