class FluentGridFieldExtension extends Extension (View source)

Supports GridFieldDetailForm_ItemRequest with extra actions

Traits

Decorates admin areas for localised items with extra actions.

Properties

GridFieldDetailForm_ItemRequest $owner

Methods

__construct()

No description

static 
add_to_class(string $class, string $extensionClass, mixed $args = null)

Called when this extension is added to a particular class

setOwner(object $owner)

Set the owner of this extension.

mixed
withOwner(mixed $owner, callable $callback, array $args = [])

Temporarily modify the owner. The original owner is ensured to be restored

clearOwner()

Clear the current owner, and restore extension to the state prior to the last setOwner()

object
getOwner()

Returns the owner of this extension.

static string
get_classname_without_arguments(string $extensionStr)

Helper method to strip eval'ed arguments from a string that's passed to {@link DataObject::$extensions} or {@link Object::add_extension()}.

mixed
invokeExtension(object $owner, string $method, array ...$arguments)

Invoke extension point. This will prefer explicit extend prefixed methods.

actionComplete(Form $form, string $message)

No description

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

DBField|null
getBadge(DataObject $record)

Given a record with Fluent enabled, return a badge that represents the state of it in the current locale

updateBadge(DBField|null $badgeField)

Push a badge to indicate the language that owns the current item

updateFormActions(FieldList $actions)

No description

Details

__construct()

static add_to_class(string $class, string $extensionClass, mixed $args = null)

Called when this extension is added to a particular class

Parameters

string $class
string $extensionClass
mixed $args

setOwner(object $owner)

Set the owner of this extension.

Parameters

object $owner

The owner object

mixed withOwner(mixed $owner, callable $callback, array $args = [])

Temporarily modify the owner. The original owner is ensured to be restored

Parameters

mixed $owner

Owner to set

callable $callback

Callback to invoke

array $args

Args to pass to callback

Return Value

mixed

clearOwner()

Clear the current owner, and restore extension to the state prior to the last setOwner()

object getOwner()

Returns the owner of this extension.

Return Value

object

static string get_classname_without_arguments(string $extensionStr)

Helper method to strip eval'ed arguments from a string that's passed to {@link DataObject::$extensions} or {@link Object::add_extension()}.

Parameters

string $extensionStr

E.g. "Versioned('Stage','Live')"

Return Value

string

Extension classname, e.g. "Versioned"

mixed invokeExtension(object $owner, string $method, array ...$arguments)

Invoke extension point. This will prefer explicit extend prefixed methods.

Parameters

object $owner
string $method
array ...$arguments

Return Value

mixed

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

Parameters

Form $form
string $message

Return Value

HTTPResponse|string|DBHTMLText

mixed clearFluent(array $data, Form $form)

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)

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

ValidationException
HTTPResponse_Exception

mixed showFluent(array $data, Form $form)

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

mixed hideFluent(array $data, Form $form)

Parameters

array $data
Form $form

Return Value

mixed

Exceptions

HTTPResponse_Exception

DBField|null getBadge(DataObject $record)

Given a record with Fluent enabled, return a badge that represents the state of it in the current locale

Parameters

DataObject $record

Return Value

DBField|null

updateBadge(DBField|null $badgeField)

Push a badge to indicate the language that owns the current item

Parameters

DBField|null $badgeField

See also

VersionedGridFieldItemRequest::Breadcrumbs

updateFormActions(FieldList $actions)

Parameters

FieldList $actions