trait FluentAdminTrait (View source)

Decorates admin areas for localised items with extra actions.

Methods

public
actionComplete(Form $form, string $message)

No description

protected
updateFluentActions(FieldList $actions, DataObject $record)

Decorate actions with fluent-specific details

public
mixed
clearFluent(array $data, Form $form)

No description

public
mixed
copyFluent(array $data, Form $form)

Copy this record to other localisations (not published)

public
mixed
unpublishFluent(array $data, Form $form)

Unpublishes the current object from all locales

public
mixed
archiveFluent(array $data, Form $form)

Archives the current object from all locales (versioned)

public
mixed
deleteFluent(array $data, Form $form)

Delete the current object from all locales (non-versioned)

public
mixed
publishFluent(array $data, Form $form)

No description

public
mixed
showFluent(array $data, Form $form)

No description

public
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

Details

abstract HTTPResponse|string|DBHTMLText actionComplete(Form $form, string $message)

No description

Parameters

Form $form
string $message

Return Value

HTTPResponse|string|DBHTMLText

protected updateFluentActions(FieldList $actions, DataObject $record)

Decorate actions with fluent-specific details

Parameters

FieldList $actions
DataObject $record

mixed clearFluent(array $data, Form $form)

No description

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed copyFluent(array $data, Form $form)

Copy this record to other localisations (not published)

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed unpublishFluent(array $data, Form $form)

Unpublishes the current object from all locales

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed archiveFluent(array $data, Form $form)

Archives the current object from all locales (versioned)

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed deleteFluent(array $data, Form $form)

Delete the current object from all locales (non-versioned)

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed publishFluent(array $data, Form $form)

No description

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

ValidationException
HTTPResponse_Exception

mixed showFluent(array $data, Form $form)

No description

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed hideFluent(array $data, Form $form)

No description

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

protected inEveryLocale(callable $doSomething)

Do an action in every locale

Parameters

callable $doSomething

protected inEveryStage(callable $doSomething)

Do an action in every stage (Live first)

Parameters

callable $doSomething

protected void updateSaveAction(FieldList $actions, DataObject $record)

Update save action based on localisation state valid states:

  • localised (localise label)
  • not localised (save label)

Parameters

FieldList $actions
DataObject $record

Return Value

void

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)

Parameters

FieldList $actions
DataObject $record

Return Value

void

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

Parameters

FieldList $actions
DataObject $record

Return Value

void