Comments: on this page. Click to read or post your own.

Class MemberTableField

Description

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.

Returns either:

  • provided members
  • members of a provided group
  • all members
  • members based on a search-query

Located in /cms/code/MemberTableField.php (line 15)

Object
   |
   --ViewableData
      |
      --RequestHandlingData
         |
         --FormField
            |
            --TableListField
               |
               --ComplexTableField
                  |
                  --MemberTableField
Variable Summary
static mixed $data_class
mixed $group
mixed $members
mixed $pageSize
mixed $permissions
mixed $template
Method Summary
MemberTableField __construct ( $controller,  $name,  $group, [ $members = null], [ $hidePassword = true], [ $pageLimit = 10])
void AddLink ()
void AddRecordForm ()
void addtogroup ()
void delete ()
void DetailForm ()
void getParentClass ()
void getParentIdName ( $childClass,  $parentClass)
void memberListWithGroupID ( $members,  $group)
string saveComplexTableField ( $data,  $form,  $params)
void SearchForm ()
void setController ( $controller)
void setGroup ( $group)
void sourceID ()
void sourceItems ()
Variables
static mixed $data_class = "Member" (line 24)
mixed $detailFormValidator (line 19)
  • access: protected

Redefinition of:
ComplexTableField::$detailFormValidator
mixed $group (line 20)
  • access: protected
mixed $hidePassword (line 17)
  • access: protected
mixed $members (line 16)
  • access: protected
mixed $pageSize (line 18)
  • access: protected

Redefinition of:
TableListField::$pageSize
mixed $permissions = array(
"add",
"edit",
"delete"
)
(line 26)
  • access: protected

Redefinition of:
ComplexTableField::$permissions
mixed $template = "MemberTableField" (line 22)
  • access: protected

Redefinition of:
ComplexTableField::$template
Template for main rendering

Inherited Variables

Inherited from ComplexTableField

ComplexTableField::$actions
ComplexTableField::$controller
ComplexTableField::$defaultAction
ComplexTableField::$detailFormFields
ComplexTableField::$itemClass
ComplexTableField::$parentClass
ComplexTableField::$parentIdName
ComplexTableField::$popupCaption
ComplexTableField::$popupClass
ComplexTableField::$popupHeight
ComplexTableField::$popupWidth
ComplexTableField::$relationAutoSetting
ComplexTableField::$showPagination
ComplexTableField::$sourceItems
ComplexTableField::$sourceJoin
ComplexTableField::$templatePopup
ComplexTableField::$unpagedSourceItems
ComplexTableField::$url_handlers
ComplexTableField::$viewAction

Inherited from TableListField

TableListField::$cachedSourceItems
TableListField::$clickAction
TableListField::$csvFieldEscape
TableListField::$csvFieldFormatting
TableListField::$csvHasHeader
TableListField::$csvSeparator
TableListField::$customCsvQuery
TableListField::$customQuery
TableListField::$customSourceItems
TableListField::$exportButtonLabel
TableListField::$extraLinkParams
TableListField::$fieldCasting
TableListField::$fieldFormatting
TableListField::$fieldList
TableListField::$fieldListCsv
TableListField::$groupByField
TableListField::$highlightConditions
TableListField::$IsReadOnly
TableListField::$Markable
TableListField::$MarkableTitle
TableListField::$methodName
TableListField::$readOnly
TableListField::$sourceClass
TableListField::$sourceFilter
TableListField::$sourceSort
TableListField::$summaryFieldList
TableListField::$summaryTitle
TableListField::$totalCount
TableListField::$__cachedQuery

Inherited from FormField

FormField::$containerFieldSet
FormField::$description
FormField::$disabled
FormField::$dontEscape
FormField::$extraClass
FormField::$extraClasses
FormField::$form
FormField::$leftTitle
FormField::$message
FormField::$messageType
FormField::$name
FormField::$readonly
FormField::$rightTitle
FormField::$tabIndex
FormField::$title
FormField::$value

Inherited from RequestHandlingData

RequestHandlingData::$allowed_actions
RequestHandlingData::$request

Inherited from ViewableData

ViewableData::$casting
ViewableData::$castingHelperPair_cache
ViewableData::$customisedObj
ViewableData::$failover
ViewableData::$iteratorPos
ViewableData::$iteratorTotalItems
ViewableData::$namedAs
ViewableData::$parent
ViewableData::$_natural_cache
ViewableData::$_object_cache
ViewableData::$_xml_cache

Inherited from Object

Object::$builtInMethods
Object::$class
Object::$classConstructed
Object::$extensions
Object::$extension_instances
Object::$extraMethods
Object::$extraStatics
Object::$statics
Object::$static_cached
Methods
Constructor __construct (line 33)
MemberTableField __construct ( $controller,  $name,  $group, [ $members = null], [ $hidePassword = true], [ $pageLimit = 10])
  • $controller
  • $name
  • $group
  • $members
  • $hidePassword
  • $pageLimit

Redefinition of:
ComplexTableField::__construct()
See class comments
AddLink (line 110)
void AddLink ()

Redefinition of:
ComplexTableField::AddLink()
AddRecordForm (line 294)

Add existing member to group by name (with JS-autocompletion)

void AddRecordForm ()
addtogroup (line 208)

Add existing member to group rather than creating a new member

void addtogroup ()
delete (line 237)

Custom delete implementation:

Remove member from group rather than from the database

void delete ()

Redefinition of:
TableListField::delete()
DetailForm (line 118)
void DetailForm ()
GetControllerName (line 287)
void GetControllerName ()
getParentClass (line 258)

#################################

Utility Functions #################################

void getParentClass ()

Redefinition of:
ComplexTableField::getParentClass()
Determines on which relation-class the DetailForm is saved by looking at the surrounding form-record.
getParentIdName (line 262)
void getParentIdName ( $childClass,  $parentClass)
  • $childClass
  • $parentClass

Redefinition of:
ComplexTableField::getParentIdName()
Returns the db-fieldname of the currently used has_one-relationship.
memberListWithGroupID (line 272)

#################################

Custom Functions #################################

void memberListWithGroupID ( $members,  $group)
  • $members
  • $group
saveComplexTableField (line 315)

Same behaviour as parent class, but adds the member to the passed GroupID.

string saveComplexTableField ( $data,  $form,  $params)
  • $data
  • $form
  • $params

Redefinition of:
ComplexTableField::saveComplexTableField()
Use the URL-Parameter "action_saveComplexTableField" to provide a clue to the main controller if the main form has to be rendered, even if there is no action relevant for the main controller (to provide the instance of ComplexTableField which in turn saves the record.
SearchForm (line 157)
void SearchForm ()
setController (line 283)
void setController ( $controller)
  • $controller
setGroup (line 280)
void setGroup ( $group)
  • $group
sourceID (line 106)

Overridden functions

void sourceID ()

Redefinition of:
ComplexTableField::sourceID()
sourceItems (line 343)

Cached version for getting the appropraite members for this particular group.

This includes getting inherited groups, such as groups under groups.

void sourceItems ()

Redefinition of:
TableListField::sourceItems()

Inherited Methods

Inherited From ComplexTableField

ComplexTableField::__construct()
ComplexTableField::add()
ComplexTableField::AddForm()
ComplexTableField::AddLink()
ComplexTableField::ajax_render()
ComplexTableField::createFieldSet()
ComplexTableField::FieldHolder()
ComplexTableField::getCustomFieldsFor()
ComplexTableField::getFieldsFor()
ComplexTableField::getParentClass()
ComplexTableField::getParentIdName()
ComplexTableField::getParentIdNameRelation()
ComplexTableField::getValidatorFor()
ComplexTableField::getViewer()
ComplexTableField::handleItem()
ComplexTableField::IsAddMode()
ComplexTableField::isComposite()
ComplexTableField::ItemCount()
ComplexTableField::Items()
ComplexTableField::saveComplexTableField()
ComplexTableField::setDetailFormValidator()
ComplexTableField::setParentClass()
ComplexTableField::setParentIdName()
ComplexTableField::setPopupCaption()
ComplexTableField::setPopupSize()
ComplexTableField::setRelationAutoSetting()
ComplexTableField::setTemplatePopup()
ComplexTableField::sourceClass()
ComplexTableField::sourceFilter()
ComplexTableField::sourceID()

Inherited From TableListField

TableListField::__construct()
TableListField::Actions()
TableListField::addSummary()
TableListField::ajax_refresh()
TableListField::BaseLink()
TableListField::Can()
TableListField::colFunction_avg()
TableListField::colFunction_sum()
TableListField::CurrentLink()
TableListField::delete()
TableListField::export()
TableListField::ExportLink()
TableListField::FieldHolder()
TableListField::FieldList()
TableListField::filterString()
TableListField::FirstItem()
TableListField::FirstLink()
TableListField::getCastedValue()
TableListField::getCsvQuery()
TableListField::getCsvSeparator()
TableListField::getExtraLinkParams()
TableListField::getPermissions()
TableListField::getQuery()
TableListField::GroupedItems()
TableListField::handleItem()
TableListField::HasGroupedItems()
TableListField::HasSummary()
TableListField::Headings()
TableListField::index()
TableListField::isFieldSortable()
TableListField::Items()
TableListField::LastItem()
TableListField::LastLink()
TableListField::ListStart()
TableListField::Name()
TableListField::NamePlural()
TableListField::NameSingular()
TableListField::NextLink()
TableListField::PageSize()
TableListField::performReadonlyTransformation()
TableListField::permissions_for_object()
TableListField::PrevLink()
TableListField::printall()
TableListField::PrintLink()
TableListField::removeCsvHeader()
TableListField::removeSummary()
TableListField::setClick_AjaxLoad()
TableListField::setClick_PopupLoad()
TableListField::setCSVFieldFormatting()
TableListField::setCsvSeparator()
TableListField::setCustomCsvQuery()
TableListField::setCustomQuery()
TableListField::setCustomSourceItems()
TableListField::setExtraLinkParams()
TableListField::setFieldCasting()
TableListField::setFieldFormatting()
TableListField::setFieldListCsv()
TableListField::setHighlightConditions()
TableListField::setPageSize()
TableListField::setPermissions()
TableListField::setShowPagination()
TableListField::setTemplate()
TableListField::ShowPagination()
TableListField::sourceClass()
TableListField::sourceFilter()
TableListField::sourceID()
TableListField::sourceItems()
TableListField::SummaryFields()
TableListField::SummaryTitle()
TableListField::Title()
TableListField::TotalCount()
TableListField::Utility()

Inherited From FormField

FormField::__construct()
FormField::addExtraClass()
FormField::attrName()
FormField::attrTitle()
FormField::attrValue()
FormField::createTag()
FormField::dataValue()
FormField::debug()
FormField::describe()
FormField::extraClass()
FormField::Field()
FormField::FieldHolder()
FormField::forTemplate()
FormField::getForm()
FormField::getTabIndex()
FormField::getTabIndexHTML()
FormField::hasClass()
FormField::hasData()
FormField::id()
FormField::isComposite()
FormField::isDisabled()
FormField::isReadonly()
FormField::jsValidation()
FormField::LeftTitle()
FormField::Link()
FormField::Message()
FormField::MessageType()
FormField::Name()
FormField::name_to_label()
FormField::performDisabledTransformation()
FormField::performReadonlyTransformation()
FormField::removeExtraClass()
FormField::Required()
FormField::RightTitle()
FormField::rootFieldSet()
FormField::saveInto()
FormField::setContainerFieldSet()
FormField::setDisabled()
FormField::setError()
FormField::setForm()
FormField::setLeftTitle()
FormField::setName()
FormField::setReadonly()
FormField::setRightTitle()
FormField::setTabIndex()
FormField::setTitle()
FormField::setValue()
FormField::SmallFieldHolder()
FormField::Title()
FormField::transform()
FormField::Type()
FormField::validate()
FormField::Value()

Inherited From RequestHandlingData

RequestHandlingData::checkAccessAction()
RequestHandlingData::getRequest()
RequestHandlingData::handleRequest()
RequestHandlingData::httpError()

Inherited From ViewableData

ViewableData::ATT_val()
ViewableData::BaseHref()
ViewableData::buildCastingHelperCache()
ViewableData::cachedCall()
ViewableData::castingHelper()
ViewableData::castingHelperPair()
ViewableData::castingObjectCreator()
ViewableData::castingObjectCreatorPair()
ViewableData::CSSClasses()
ViewableData::CurrentMember()
ViewableData::CurrentPage()
ViewableData::customise()
ViewableData::Debug()
ViewableData::defineMethods()
ViewableData::escapeTypeForField()
ViewableData::Even()
ViewableData::EvenOdd()
ViewableData::First()
ViewableData::FirstLast()
ViewableData::getField()
ViewableData::getIterator()
ViewableData::getXMLValues()
ViewableData::hasField()
ViewableData::HasPerm()
ViewableData::hasValue()
ViewableData::i18nLocale()
ViewableData::IsAjax()
ViewableData::iteratorProperties()
ViewableData::JS_val()
ViewableData::Last()
ViewableData::Me()
ViewableData::Middle()
ViewableData::MiddleString()
ViewableData::obj()
ViewableData::Odd()
ViewableData::Pos()
ViewableData::RAW_val()
ViewableData::renderWith()
ViewableData::SecurityID()
ViewableData::setCustomisedObj()
ViewableData::setField()
ViewableData::SQL_val()
ViewableData::ThemeDir()
ViewableData::Top()
ViewableData::TotalItems()
ViewableData::val()
ViewableData::XML_val()
ViewableData::__get()
ViewableData::__isset()
ViewableData::__set()

Inherited From Object

Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:43:08 +1300 by phpDocumentor 1.3.2