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 GalleryPhoto extends DataObject { | |
private static $db = array ( | |
'Caption' => 'Varchar' | |
); | |
private static $has_one = array ( | |
'Photo' => 'Image', | |
'ProjectPage' => 'ProjectPage' |
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
;; Taken from https://gist.github.com/mmichelli/1062600 | |
;; replace html-mode with web-mode in line 4 to get more web-mode like behaviour | |
(define-derived-mode silverstripe-mode html-mode "Silverstripe" | |
(font-lock-add-keywords | |
nil | |
'( | |
("\\(<% \\| %>\\)" 1 font-lock-keyword-face) | |
("\\(\\(if\\|else\\|control\\|cacheblock\\|Level\\|end_[a-zA-Z1-9_\.]*\\|include\\)+\\)\\>" 1 font-lock-function-name-face) |