\ModelAdmin_CollectionController
Handles a managed model class and provides default collection filtering behavior.
Synopsis
class ModelAdmin_CollectionController
extends Controller
{
- // members
- public $parentController;
- protected $modelClass;
- public $showImportForm = NULL;
- public static array $url_handlers = ;
- // methods
- public void __construct()
- public string Link()
- public unknown getModelClass()
- public unknown handleActionOrID()
- public RecordController handleID()
- public string getModelSidebar()
- public Form SearchForm()
- public void CreateForm()
- public void showImportForm()
- public Form ImportForm()
- public void import()
- public void columnsAvailable()
- public void columnsSelectedByDefault()
- public void ColumnSelectionField()
- public string search()
- public SQLQuery getSearchQuery()
- public void getResultColumns()
- public TableListField getResultsTable()
- public Form ResultsForm()
- public unknown add()
- public Form AddForm()
- public void doCreate()
Hierarchy
Extends
- Controller
Tasks
Line | Task |
---|---|
525+ | Figure out ajax submission of files via jQuery.form plugin |
739 | Remove records that can't be viewed by the current user |
Members
protected
- $modelClass
public
- $parentController
- $showImportForm
- $url_handlers
Methods
public
- __construct()
- AddForm() — Returns a form suitable for adding a new model, falling back on the default edit form.
- ColumnSelectionField() — Give the flexibilility to show variouse combination of columns in the search result table
- CreateForm() — Create a form that consists of one button that directs to a give model's Add form
- ImportForm() — Generate a CSV import form for a single {@link DataObject} subclass.
- Link() — Appends the model class to the URL.
- ResultsForm() — Shows results from the "search" action in a TableListField.
- SearchForm() — Get a search form for a single {@link DataObject} subclass.
- add() — Create a new model record.
- columnsAvailable() — Return the columns available in the column selection field.
- columnsSelectedByDefault() — Return the columns selected by default in the column selection field.
- doCreate()
- getModelClass() — Return the class name of the model being managed.
- getModelSidebar() — Get a combination of the Search, Import and Create forms that can be inserted into a {@link ModelAdmin} sidebar.
- getResultColumns() — Returns all columns used for tabular search results display.
- getResultsTable() — Creates and returns the result table field for resultsForm.
- getSearchQuery() — Gets the search query generated on the SearchContext from {@link DataObject::getDefaultSearchContext()}, and the current GET parameters on the request.
- handleActionOrID() — Delegate to different control flow, depending on whether the URL parameter is a number (record id) or string (action).
- handleID() — Delegate to the RecordController if a valid numeric ID appears in the URL segment.
- import() — Imports the submitted CSV file based on specifications given in {@link self::model_importers}.
- search() — Action to render a data object collection, using the model context to provide filters and paging.
- showImportForm() — Checks if a CSV import form should be generated by a className criteria or in general for ModelAdmin.