Skip to content

Instantly share code, notes, and snippets.

Created June 8, 2015 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/085c0aba91b491e0570a to your computer and use it in GitHub Desktop.
Save anonymous/085c0aba91b491e0570a to your computer and use it in GitHub Desktop.
mysite/code/Page.php
<?php
class Page extends SiteTree {
private static $db = array(
);
private static $has_one = array(
);
}
class Page_Controller extends ContentController {
/**
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
* permissions or conditions required to allow the user to access it.
*
* <code>
* array (
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* );
* </code>
*
* @var array
*/
private static $allowed_actions = array (
);
public function init() {
parent::init();
// You can include any CSS or JS required by your project here.
// See: http://doc.silverstripe.org/framework/en/reference/requirements
}
}
mysite/code/HomePage.php
<?php
/**
* Created by PhpStorm.
* User: joe.broderick
* Date: 6/8/2015
* Time: 2:01 PM
*/
class HomePage extends Page {
}
class HomePage_Controller extends Page_Controller {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment