Created
April 3, 2013 00:57
-
-
Save gordonbanderson/5297609 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ContactPageAddress extends DataObject { | |
static $db = array( | |
'PostalAddress' => 'Text' | |
); | |
static $has_one = array( 'ContactPage' => 'ContactPage' ); | |
public static $summary_fields = array( | |
'PostalAddress' => 'PostalAddress' | |
); | |
function getCMSFields() { | |
$fields = new FieldList(); | |
$fields->push( new TabSet( "Root", $mainTab = new Tab( "Main" ) ) ); | |
$mainTab->setTitle( _t( 'SiteTree.TABMAIN', "Main" ) ); | |
$fields->addFieldToTab( "Root.Main", new TextField( 'PostalAddress' ) ); | |
$this->extend( 'updateCMSFields', $fields ); | |
return $fields; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment