Created
November 8, 2016 04:36
-
-
Save muskie9/7d4e9190382720ecd3a32ee7e64c37a4 to your computer and use it in GitHub Desktop.
This file contains 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 CalendarSiteConfigExtension | |
*/ | |
class CalendarSiteConfigExtension extends DataExtension | |
{ | |
/** | |
* @var array | |
*/ | |
private static $db = array( | |
'EventInstancesToShow' => 'Int', | |
); | |
/** | |
* @param FieldList $fields | |
*/ | |
public function updateCMSFields(FieldList $fields) | |
{ | |
$fields->addFieldToTab('Root', new TabSet('Calendar', 'Calendar')); | |
$fields->addFieldToTab( | |
'Root.Calendar.Settings', | |
NumericField::create('EventInstancesToShow') | |
->setTitle('Event Instances To Show') | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment