silverstripe-installer/mysite/code/Page.php
jonom e0ce35217c Removed misleading comments and legacy requirement calls
The instructions in the init() function seem to be at odds with the current documentation which suggests that it is preferable to include requirements in PHP code rather than in templates.

Also the requirement calls here are supposedly included so that older themes still work - but how old are we talking? I would assume that these older themes would not be compatible with SS3.1, and the bundled Simple theme does not need these requirement calls in the init() function, making them redundant.

I am guessing that the Installer is primarily used by people just getting started with SilverStripe, so ideally this bundled example Page.php should provide a clear pathway to best practice SS development, rather than supporting out-dated code.
2013-11-11 09:22:36 +07:00

38 lines
948 B
PHP
Executable File

<?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
}
}