Add core cms recipe config

This commit is contained in:
Damian Mooyman 2017-07-11 15:16:08 +12:00
parent 7d7af93c3d
commit 488879d45c
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
8 changed files with 179 additions and 0 deletions

11
.cow.json Normal file
View File

@ -0,0 +1,11 @@
{
"github-slug": "silverstripe/recipe-cms",
"child-stability-inherit": true,
"dependency-constraint": "exact",
"vendors": [
"silverstripe"
],
"exclude": [
"silverstripe/recipe-plugin"
]
}

29
.editorconfig Normal file
View File

@ -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

6
.gitattributes vendored Normal file
View File

@ -0,0 +1,6 @@
.cow.json export-ignore
.editorconfig export-ignore
.env.example export-ignore
.gitattributes export-ignore
LICENSE export-ignore
README.md

26
.gitignore vendored Normal file
View File

@ -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/

28
README.md Normal file
View File

@ -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.

35
composer.json Normal file
View File

@ -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"
}

12
mysite/code/Page.php Executable file
View File

@ -0,0 +1,12 @@
<?php
use SilverStripe\CMS\Model\SiteTree;
class Page extends SiteTree
{
private static $db = array(
);
private static $has_one = array(
);
}

View File

@ -0,0 +1,32 @@
<?php
use SilverStripe\CMS\Controllers\ContentController;
class PageController 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(
);
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/
}
}