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 Page extends SiteTree { | |
private static $db = array( | |
'ShowInFooter' => 'Boolean' | |
); | |
private static $defaults = array( | |
'ShowInFooter' => 1 |
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 SomeModelAdmin extends ModelAdmin { | |
private static $managed_models = array( | |
"MyDataObject" | |
); | |
public function getEditForm($id = null, $fields = null) { | |
$form = parent::getEditForm($id, $fields); |
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 | |
/** | |
* Implements "disallowed children" functionality for page classes. Usage: | |
* private static $disallowed_children = array( | |
* 'SomePageType', | |
* 'SomeOtherPageType' | |
* ); | |
* Note: not fully tested (e.g. does this prevent changing parent in "Settings" tab?) | |
* @author Loz Calver <[email protected]> |
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
LeftAndMain: | |
extra_requirements_javascript: | |
- mysite/js/myfile.js |
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 FixedCurrencyField extends CurrencyField { | |
/** | |
* @param mixed $val | |
* @return $this | |
*/ | |
public function setValue($val) { | |
if( ! $val) $val = 0.00; |
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
File: | |
allowed_extensions: | |
- 'svg' |
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 CarouselSlide extends DataObject { | |
private static $db = array( | |
'Title' => 'Varchar(255)', | |
'Description' => 'Text' | |
); | |
private static $has_one = array( |
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 Page extends SiteTree { | |
/** | |
* Return any event pages that are in this section. | |
* @param ArrayList|null $children | |
* @param ArrayList|null &$events | |
* @return ArrayList | |
*/ |
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 LeftAndMainSiteTreeExtension extends Extension { | |
/** | |
* Fix for disappearing SiteTree. | |
* @see https://github.com/silverstripe/silverstripe-framework/issues/4137 | |
* @see https://github.com/silverstripe/silverstripe-cms/issues/1135 | |
* @param &$html | |
*/ |
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 SomeModelAdmin extends ModelAdmin { | |
private static $managed_models = array( | |
"MyDataObject" | |
); | |
public function getEditForm($id = null, $fields = null) { | |
$form = parent::getEditForm($id, $fields); |