Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class ApplicantsHolder extends Page {
- static $allowed_children = array ( 'Applicant' );
- static $db = array(
- );
- static $has_many = array(
- 'Applicants' => 'Applicant'
- );
- function getCMSFields() {
- $fields = parent::getCMSFields();
- $tablefield = new HasManyComplexTableField(
- $this,
- 'Applicants',
- 'Applicant',
- array(
- 'FirstName' => 'First Name',
- 'LastName' => 'Last Name',
- 'DateOfBirth' => 'Date of Birth'
- ),
- 'getCMSFields_forPopup'
- );
- $tablefield->setAddTitle( 'An Applicant' );
- $fields->addFieldToTab( 'Root.Content.Applicants', $tablefield );
- return $fields;
- }
- }
- class ApplicantsHolder_Controller extends Page_Controller {
- }
Add Comment
Please, Sign In to add comment