diff --git a/app/src/Page.php b/app/src/Page.php new file mode 100755 index 0000000..d5d11e7 --- /dev/null +++ b/app/src/Page.php @@ -0,0 +1,13 @@ + + * [ + * '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 = []; + + protected 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/composer.json b/composer.json index b3f398b..61e4a93 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,16 @@ "require-dev": { "phpunit/PHPUnit": "^5.7" }, + "autoload": { + "psr-4": {}, + "classmap": [ + "app/src/Page.php", + "app/src/PageController.php" + ] + }, "extra": { "project-files": [ - "mysite/code/*" + "app/src/*" ], "branch-alias": { "1.x-dev": "1.2.x-dev" diff --git a/mysite/code/Page.php b/mysite/code/Page.php deleted file mode 100755 index 6300926..0000000 --- a/mysite/code/Page.php +++ /dev/null @@ -1,10 +0,0 @@ - - * [ - * '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 = []; - - protected 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/ - } -}