\ContentModuleRelationshipEditor
Synopsis
class ContentModuleRelationshipEditor
extends FormField
{
- // members
- protected $_relationship;
- protected $record;
- protected $_fieldList;
- protected $_originalName;
- protected $_idField;
- protected boolean $_canEdit = true;
- protected boolean $showAddButton = false;
- protected boolean $showAddExistingButton = false;
- protected boolean $showDeleteButton = true;
- protected $sortField = NULL;
- protected $maxItems = NULL;
- private static array $url_handlers = ;
- private static array $allowed_actions = ;
- // methods
- public void __construct()
- public void Link()
- public void setContentModuleNames()
- public void isManyMany()
- public void isHasMany()
- public void setCanEdit()
- public void getCanEdit()
- public void setShowAddButton()
- public void getShowAddButton()
- public void setShowAddExistingButton()
- public void getShowAddExistingButton()
- public void setShowDeleteButton()
- public void getShowDeleteButton()
- public void getExistingItems()
- public void getExistingDropdown()
- public $this setSortField()
- public void getSortField()
- public SS_HTTPResponse sort()
- public SS_HTTPResponse reload()
- public Form getForm()
- public void getRelation()
- public void getSource()
- public void getSourceCount()
- public void getItems()
- public void setRecord()
- public void getRecord()
- public void FieldHolder()
- public mixed FieldList()
- public ArrayList Header()
- public void NoColumns()
- public void remove()
- public void deleteitem()
- public void edititem()
- protected void getItemClassName()
- public void newitem()
- public void existingitem()
- public string getSessionKey()
- public void setSessionID()
- public string getSessionID()
- public Form ItemEditForm()
- public void save()
- public void setMaxItems()
- public void getMaxItems()
- public void getHasMaxItems()
- public static static|GridField create_table_field()
Hierarchy
Extends
- FormField
Members
private
- $allowed_actions
- $url_handlers
protected
- $_canEdit
- $_fieldList
- $_idField
- $_originalName
- $_relationship
- $maxItems
- $record
- $showAddButton
- $showAddExistingButton
- $showDeleteButton
- $sortField
Methods
protected
public
- __construct()
- FieldHolder()
- FieldList() — Get the list of fields from DataObject::$summary_fields
- Header() — Get the header fields
- ItemEditForm() — Calls {@link DataObject->getCMSFields()}
- Link()
- NoColumns()
- create_table_field() — Wraps creating a table field, if using ContentModuleField it will return a ContentModuleRelationshipEditor Otherwise returns a GridField
- deleteitem()
- edititem()
- existingitem()
- getCanEdit()
- getExistingDropdown()
- getExistingItems()
- getForm() — Get the form, checks for a current ContentModuleField first
- getHasMaxItems()
- getItems()
- getMaxItems()
- getRecord()
- getRelation()
- getSessionID() — Gets ID for an item from previous request stored in Session in subsequent requests
- getSessionKey() — Session key for storing the item ID
- getShowAddButton()
- getShowAddExistingButton()
- getShowDeleteButton()
- getSortField()
- getSource()
- getSourceCount()
- isHasMany()
- isManyMany()
- newitem()
- reload() — Returns the field template to update
- remove()
- save()
- setCanEdit()
- setContentModuleNames()
- setMaxItems() — Set maximum items to display
- setRecord()
- setSessionID() — Stores ID in Session so it can be used for item lookup in subsequent requests
- setShowAddButton() — Set add button to visible
- setShowAddExistingButton() — Set add existing button to visible
- setShowDeleteButton() — Set add button to visible
- setSortField() — Set the sort field, if set, drag and drop sorting is enabled
- sort() — Action for handling sorting of the items in the relationship