[ class tree: swipestripe ] [ index: swipestripe ] [ all elements ]

Class: BelongsManyManyComplexTableField

Source Location: /thirdparty/BelongsManyManyComplexTableField.php

Class Overview


Patched ManyManyComplexTableField http://open.silverstripe.org/attachment/ticket/6737/mmctf.diff



Class Details

[line 39]
Patched ManyManyComplexTableField http://open.silverstripe.org/attachment/ticket/6737/mmctf.diff

Special ComplexTableField for editing a many_many relation.

This field allows you to show a **many-to-many** relation with a group of DataObjects as a (readonly) tabular list (similiar to ComplexTableField). Its most useful when you want to manage the relationship itself thanks to the check boxes present on each line of the table.

ComplexTableField for more documentation on the base-class. HasManyComplexTableField for more documentation on the relation table base-class.

Note: This class relies on the fact that both sides of the relation have database tables. If you are only creating a class as a logical extension (that is, it doesn't have any database fields), then you will need to create a dummy static $db array because SilverStripe won't create a database table unless needed.


  1.  $tablefield new ManyManyComplexTableField(
  2.      $this,
  3.      'MyFruits',
  4.      'Fruit',
  5.      array(
  6.      'Name' => 'Name',
  7.      'Color' => 'Color'
  8.      ),
  9.      'getCMSFields_forPopup'
  10.  );

[ Top ]

Class Variables

$itemClass =  'BelongsManyManyComplexTableField_Item'

[line 43]


access:  public

Type:   mixed

[ Top ]

Class Methods

constructor __construct [line 45]

BelongsManyManyComplexTableField __construct( $controller, $name, $sourceClass, [ $fieldList = null], [ $detailFormFields = null], [ $sourceFilter = ""], [ $sourceSort = ""], [ $sourceJoin = ""])



[ Top ]

method getParentIdName [line 88]

void getParentIdName( $parentClass, $childClass)



[ Top ]

method getQuery [line 80]

void getQuery( )

[ Top ]

Documentation generated on Thu, 08 Mar 2012 16:47:24 +1300 by phpDocumentor 1.4.4