VersionedGridFieldState deprecated
class VersionedGridFieldState implements GridField_ColumnProvider (View source)
deprecated
Properties
| protected | string | $column | ||
| protected | $versionedLabelFields | Fields/columns to display version states. We can specifies more than one field but states only show in the first column found.  | 
                
Methods
Modify the list of columns displayed in the table.
HTML for the column, content of the
Attributes for the element containing the content returned by getColumnContent().
Additional metadata about the column which can be used by other components, e.g. to set a title for a search column header.
A flag provides the user with additional data about the current item status, for example a "removed from draft" status. Each item can have more than one status flag. Returns a map of a unique key to a (localized) title for the flag. The unique key can be reused as a CSS class.
Details
        
                            
    __construct($versionedLabelFields = ['Name', 'Title'])
        
    
    No description
        
                            string
    getColumn()
        
    
    Column to decorate with version state
        
                            VersionedGridFieldState
    setColumn(string $column)
        
    
    No description
        
                            array
    getVersionedLabelFields()
        
    
    Search list for default column
        
                            VersionedGridFieldState
    setVersionedLabelFields(array $versionedLabelFields)
        
    
    No description
        
                            
    augmentColumns(GridField $gridField, array $columns)
        
    
    Modify the list of columns displayed in the table.
        
                            array
    getColumnsHandled(GridField $gridField)
        
    
    Names of all columns which are affected by this component.
        
                            string
    getColumnContent(GridField $gridField, ViewableData $record, string $columnName)
        
    
    HTML for the column, content of the
        
                            array
    getColumnAttributes(GridField $gridField, ViewableData $record, string $columnName)
        
    
    Attributes for the element containing the content returned by getColumnContent().
        
                            array
    getColumnMetadata(GridField $gridField, string $columnName)
        
    
    Additional metadata about the column which can be used by other components, e.g. to set a title for a search column header.
        
                    protected        array
    getStatusFlags(Versioned|DataObject $record)
        
    
    A flag provides the user with additional data about the current item status, for example a "removed from draft" status. Each item can have more than one status flag. Returns a map of a unique key to a (localized) title for the flag. The unique key can be reused as a CSS class.
Example (simple):
  "deletedonlive" => "Deleted"
Example (with optional title attribute):
  "deletedonlive" => array(
     'text' => "Deleted",
     'title' => 'This page has been deleted'
  )