From 488879d45c9542c73a243e394ba6cfc6c2eb82cc Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Tue, 11 Jul 2017 15:16:08 +1200 Subject: [PATCH] Add core cms recipe config --- .cow.json | 11 +++++++++++ .editorconfig | 29 ++++++++++++++++++++++++++++ .gitattributes | 6 ++++++ .gitignore | 26 +++++++++++++++++++++++++ README.md | 28 +++++++++++++++++++++++++++ composer.json | 35 ++++++++++++++++++++++++++++++++++ mysite/code/Page.php | 12 ++++++++++++ mysite/code/PageController.php | 32 +++++++++++++++++++++++++++++++ 8 files changed, 179 insertions(+) create mode 100644 .cow.json create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 composer.json create mode 100755 mysite/code/Page.php create mode 100644 mysite/code/PageController.php diff --git a/.cow.json b/.cow.json new file mode 100644 index 0000000..1470842 --- /dev/null +++ b/.cow.json @@ -0,0 +1,11 @@ +{ + "github-slug": "silverstripe/recipe-cms", + "child-stability-inherit": true, + "dependency-constraint": "exact", + "vendors": [ + "silverstripe" + ], + "exclude": [ + "silverstripe/recipe-plugin" + ] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9f76bfa --- /dev/null +++ b/.editorconfig @@ -0,0 +1,29 @@ +# For more information about the properties used in +# this file, please see the EditorConfig documentation: +# http://editorconfig.org/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.yml] +indent_size = 2 +indent_style = space + +[*.{yml,json}] +# The indent size used in the `package.json` file cannot be changed +# https://github.com/npm/npm/pull/3180#issuecomment-16336516 +indent_size = 2 +indent_style = space + +[composer.json] +indent_size = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f0a8058 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +.cow.json export-ignore +.editorconfig export-ignore +.env.example export-ignore +.gitattributes export-ignore +LICENSE export-ignore +README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4af10a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# ignore cache folder +/silverstripe-cache/ + +# ignore .env file +/.env + +# ignore build tools +/tools/phing-metadata + +# ignore composer vendor folder +/vendor/ + +# ignore default modules from composer +/asset-admin/ +/campaign-admin/ +/cms/ +/framework/ +/graphql/ +/reports/ +/silverstripe-admin/ +/silverstripe-assets/ +/silverstripe-errorpage/ +/siteconfig/ +/themes/simple/ +/versioned/ +/testsession/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..4bec246 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +## SilverStripe CMS Recipe + +Base page and asset content-editing recipe for a SilverStripe ([http://silverstripe.org](http://silverstripe.org)) +installation. This includes the modules: + +Provided by [silverstripe/recipe-core]: + + * [framework](http://github.com/silverstripe/silverstripe-framework): Module including the base framework + * [config](https://github.com/silverstripe/silverstripe-config): Core config library + * [assets](http://github.com/silverstripe/silverstripe-assets): Filesystem module + +Provided by [silverstripe/recipe-cms]: + + * [admin](http://github.com/silverstripe/silverstripe-admin) + * [asset-admin](http://github.com/silverstripe/silverstripe-asset-admin) + * [campaign-admin](http://github.com/silverstripe/silverstripe-campaign-admin) + * [cms](http://github.com/silverstripe/silverstripe-cms) + * [errorpage](http://github.com/silverstripe/silverstripe-errorpage) + * [reports](http://github.com/silverstripe/silverstripe-reports) + * [graphql](http://github.com/silverstripe/silverstripe-graphql) + * [siteconfig](http://github.com/silverstripe/silverstripe-siteconfig) + * [versioned](http://github.com/silverstripe/silverstripe-versioned) + +This can be either added to an existing project or used as a project base for creating a +fully featured SilverStripe CMS project. + +See the [recipe plugin](https://github.com/silverstripe/recipe-plugin) page for instructions on how +SilverStripe recipes work. diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..74a734f --- /dev/null +++ b/composer.json @@ -0,0 +1,35 @@ +{ + "name": "silverstripe/recipe-core", + "type": "silverstripe-recipe", + "description": "SilverStripe recipe for fully featured page and asset content editing", + "require": { + "silverstripe/recipe-plugin": "^0.1", + "silverstripe/recipe-core": "4.0.x-dev", + "silverstripe/admin": "1.0.x-dev", + "silverstripe/asset-admin": "1.0.x-dev", + "silverstripe/campaign-admin": "1.0.x-dev", + "silverstripe/cms": "4.0.x-dev", + "silverstripe/errorpage": "1.0.x-dev", + "silverstripe/graphql": "0.2.x-dev", + "silverstripe/reports": "4.0.x-dev", + "silverstripe/siteconfig": "4.0.x-dev", + "silverstripe/versioned": "1.0.x-dev" + }, + "require-dev": { + "phpunit/PHPUnit": "^5.7" + }, + "extra": { + "project-files": [ + "mysite/code/*" + ], + "branch-alias": { + "1.x-dev": "1.0.x-dev", + "dev-master": "2.x-dev" + } + }, + "config": { + "process-timeout": 600 + }, + "prefer-stable": true, + "minimum-stability": "dev" +} diff --git a/mysite/code/Page.php b/mysite/code/Page.php new file mode 100755 index 0000000..b83000d --- /dev/null +++ b/mysite/code/Page.php @@ -0,0 +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( + + ); + + 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/ + } +}