FluentGridFieldExtension
class FluentGridFieldExtension extends Extension (View source)
Supports GridFieldDetailForm_ItemRequest with extra actions
Traits
Decorates admin areas for localised items with extra actions.
Properties
| protected | T | $owner | The object this extension is applied to.  | 
                from Extension | 
Methods
Called when this extension is added to a particular class
Temporarily modify the owner. The original owner is ensured to be restored
Clear the current owner, and restore extension to the state prior to the last setOwner()
Helper method to strip eval'ed arguments from a string that's passed to DataObject::$extensions or Object::add_extension().
Invoke extension point. This will prefer explicit extend prefixed
methods.
Decorate actions with fluent-specific details
Do an action in every stage (Live first)
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
Add the Fluent state badge before any existing badges and return the result
Given a record with Fluent enabled, return a badge that represents the state of it in the current locale
Push a badge to indicate the language that owns the current item
Details
        
                            
    __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()
        
                            T
    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 DataObject::$extensions or Object::add_extension().
        
                            mixed
    invokeExtension(object $owner, string $method, array ...$arguments)
        
    
    Invoke extension point. This will prefer explicit extend prefixed
methods.
        
                            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
        
                    protected        DBField|null
    addFluentBadge(DBField|null $badgeField, DataObject $record)
        
    
    Add the Fluent state badge before any existing badges and return the result
        
                            DBField|null
    getBadge(DataObject $record)
        
    
    Given a record with Fluent enabled, return a badge that represents the state of it in the current locale
        
                    protected        string
    generateBadgeHTML(DataObject $record, Locale $locale, array $extraProperties = [])
        
    
    No description
        
                            
    updateBadge(DBField|null $badgeField)
        deprecated
    
    deprecated
Push a badge to indicate the language that owns the current item
        
                            
    updateFormActions(FieldList $actions)
        
    
    No description