\MemberTableField
Enhances {ComplexTableField} with the ability to list groups and given members.
It is based around groups, so it deletes Members from a Group rather than from the entire system.
In contrast to the original implementation, the URL-parameters "ParentClass" and "ParentID" are used
to specify "Group" (hardcoded) and the GroupID-relation.
@todo write a better description about what this field does.
Returns either:
- provided members
- members of a provided group
- all members
- members based on a search-query
Synopsis
class MemberTableField
extends ComplexTableField
{
- // members
- protected $members;
- protected $hidePassword;
- protected $detailFormValidator;
- protected $group;
- protected string $template = 'MemberTableField';
- public string $popupClass = 'MemberTableField_Popup';
- public string $itemClass = 'MemberTableField_Item';
- public static string $data_class = 'Member';
- public static integer $page_size = 20;
- protected array $permissions = ;
- // methods
- public void __construct()
- public void FieldHolder()
- public void sourceID()
- public void AddLink()
- public void SearchForm()
- public void addtogroup()
- public void delete()
- public void getParentClass()
- public void getParentIdName()
- public DataObjectSet memberListWithGroupID()
- public void setGroup()
- public Group getGroup()
- public void setController()
- public void GetControllerName()
- public void AddRecordForm()
- public void AddForm()
- public string saveComplexTableField()
- public void sourceItems()
- public void TotalCount()
- public void handleItem()
Hierarchy
Extends
- ComplexTableField
Tasks
Line | Task |
---|---|
89 | shouldn't this use $this->group? It's unclear exactly |
238 | Not sure how this is called, using $_REQUEST to be on the safe side |
Members
protected
- $detailFormValidator
- $group
- $hidePassword
- $members
- $permissions
- $template
public
- $data_class
- $itemClass
- $page_size
—
int
Set the page size for this table. - $popupClass
Methods
public
- __construct() — Constructor method for MemberTableField.
- AddForm()
- AddLink()
- AddRecordForm() — Add existing member to group by name (with JS-autocompletion)
- FieldHolder()
- GetControllerName()
- SearchForm()
- TotalCount()
- addtogroup() — Add existing member to group rather than creating a new member
- delete() — Custom delete implementation: Remove member from group rather than from the database
- getGroup()
- getParentClass() — ################################# Utility Functions #################################
- getParentIdName()
- handleItem() — Handles item requests MemberTableField needs its own item request class so that it can overload the delete method
- memberListWithGroupID() — Customise an existing DataObjectSet of Member objects with a GroupID.
- saveComplexTableField() — Same behaviour as parent class, but adds the member to the passed GroupID.
- setController()
- setGroup()
- sourceID()
- sourceItems() — Cached version for getting the appropraite members for this particular group.