2011-12-06 01:56:24 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base interface for all components that can be added to GridField.
|
|
|
|
*/
|
|
|
|
interface GridFieldComponent {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A GridField manipulator that provides HTML for the header/footer rows, or for before/after the template
|
|
|
|
*/
|
|
|
|
interface GridField_HTMLProvider extends GridFieldComponent {
|
|
|
|
/**
|
2012-01-09 05:39:18 +01:00
|
|
|
* Returns a map with 4 keys 'header', 'footer', 'before', 'after'. Each of these can contain an
|
2011-12-06 01:56:24 +01:00
|
|
|
* HTML fragment and each of these are optional.
|
|
|
|
*/
|
|
|
|
function getHTMLFragments($gridField);
|
|
|
|
}
|
|
|
|
interface GridField_ColumnProvider extends GridFieldComponent {
|
|
|
|
function augmentColumns($gridField, &$columns);
|
|
|
|
function getColumnsHandled($gridField);
|
|
|
|
function getColumnContent($gridField, $record, $columnName);
|
|
|
|
function getColumnAttributes($gridField, $record, $columnName);
|
|
|
|
function getColumnMetadata($gridField, $columnName);
|
|
|
|
}
|
|
|
|
interface GridField_ActionProvider extends GridFieldComponent {
|
|
|
|
/**
|
|
|
|
* Return a list of the actions handled by this action provider
|
|
|
|
*/
|
|
|
|
function getActions($gridField);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle an action on the given gridField.
|
|
|
|
*/
|
|
|
|
function handleAction(GridField $gridField, $actionName, $arguments, $data);
|
|
|
|
}
|
|
|
|
interface GridField_DataManipulator extends GridFieldComponent {
|
|
|
|
/**
|
|
|
|
* Manipulate the datalist as needed by this grid modifier.
|
|
|
|
* Return the new DataList.
|
|
|
|
*/
|
|
|
|
function getManipulatedData(GridField $gridField, SS_List $dataList);
|
2012-01-09 06:47:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface GridField_URLHandler extends GridFieldComponent {
|
|
|
|
/**
|
|
|
|
* Return URLs to be handled by this grid field, in an array the same form as $url_handlers.
|
|
|
|
*
|
|
|
|
* Handler methods will be called on the component, rather than the grid field.
|
|
|
|
*
|
|
|
|
* The handlers will be passed two arguments, $gridField and $request
|
|
|
|
*/
|
|
|
|
function getURLHandlers($gridField);
|
2011-12-06 01:56:24 +01:00
|
|
|
}
|