From e9a4095c9a07d83ec960dfc0a66cd2c005549a6d Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 5 Jan 2017 13:07:23 +1300 Subject: [PATCH] PSR-2 compliance: Move PageController class to its own file --- mysite/code/Page.php | 33 ++------------------------------- mysite/code/PageController.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 31 deletions(-) create mode 100644 mysite/code/PageController.php diff --git a/mysite/code/Page.php b/mysite/code/Page.php index d03bf83..9437a93 100755 --- a/mysite/code/Page.php +++ b/mysite/code/Page.php @@ -1,41 +1,12 @@ - * 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 - * ); - * - * - * @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: https://docs.silverstripe.org/en/developer_guides/templates/requirements/ - } - } diff --git a/mysite/code/PageController.php b/mysite/code/PageController.php new file mode 100644 index 0000000..fa4547d --- /dev/null +++ b/mysite/code/PageController.php @@ -0,0 +1,31 @@ + + * 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 + * ); + * + * + * @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: https://docs.silverstripe.org/en/developer_guides/templates/requirements/ + } +}