Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Oct 15, 2020
0 parents commit fd05b59
Show file tree
Hide file tree
Showing 17 changed files with 5,926 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/silverstripe-cache/
/.env
/vendor/
/themes/simple/
/_resources/
/public/_resources/
2 changes: 2 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RewriteEngine On
RewriteRule ^(.*)$ public/$1
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Overview

Base project folder for a SilverStripe ([http://silverstripe.org](http://silverstripe.org)) installation. Required modules are installed via [http://github.com/silverstripe/recipe-cms](http://github.com/silverstripe/recipe-cms). For information on how to change the dependencies in a recipe, please have a look at [https://github.com/silverstripe/recipe-plugin](https://github.com/silverstripe/recipe-plugin). In addition, installer includes [theme/simple](https://github.com/silverstripe-themes/silverstripe-simple) as a default theme.

## Installation ##

`composer create-project silverstripe/installer my-app`

See [Getting Started](https://docs.silverstripe.org/en/4/getting_started/) for more information.

## Bugtracker ##

Bugs are tracked on github.com ([framework issues](https://github.com/silverstripe/silverstripe-framework/issues),
[cms issues](https://github.com/silverstripe/silverstripe-cms/issues)).
Please read our [issue reporting guidelines](https://docs.silverstripe.org/en/4/contributing/issues_and_bugs/).

## Development and Contribution ##

If you would like to make changes to the SilverStripe core codebase, we have an extensive [guide to contributing code](https://docs.silverstripe.org/en/4/contributing/code/).

## Links ##

* [Changelogs](https://docs.silverstripe.org/en/4/changelogs/)
* [Bugtracker: Framework](https://github.com/silverstripe/silverstripe-framework/issues)
* [Bugtracker: CMS](https://github.com/silverstripe/silverstripe-cms/issues)
* [Bugtracker: Installer](https://github.com/silverstripe/silverstripe-installer/issues)
* [Forums](http://silverstripe.org/forums)
* [Developer Mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev)
* [License](./LICENSE)
3 changes: 3 additions & 0 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
Require all denied
</FilesMatch>
9 changes: 9 additions & 0 deletions app/_config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

use SilverStripe\Security\PasswordValidator;
use SilverStripe\Security\Member;

// remove PasswordValidator for SilverStripe 5.0
$validator = PasswordValidator::create();
// Settings are registered via Injector configuration - see passwords.yml in framework
Member::set_password_validator($validator);
26 changes: 26 additions & 0 deletions app/_config/assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SilverStripe 4.4 changes the way files are resolved. `silverstripe-assets` resolves files using a variety of formats
# by default. When starting a brand new project on SilverStripe 4.4 or greater, those extra formats are not needed and
# will slowdown file resolution requests a bit. This config removes those redundant formats.

---
Name: project-assetsflysystem
After: '#assetsflysystem'
---
SilverStripe\Core\Injector\Injector:
# Define public resolution strategy
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.public:
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
properties:
ResolutionFileIDHelpers:
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
- '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
VersionedStage: Live
# Define protected resolution strategy
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.protected:
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
properties:
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
ResolutionFileIDHelpers:
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
VersionedStage: Stage
9 changes: 9 additions & 0 deletions app/_config/mimevalidator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
Name: app-mimeuploadvalidator
After: '#mimeuploadvalidator'
Only:
moduleexists: 'silverstripe/mimevalidator'
---
SilverStripe\Core\Injector\Injector:
SilverStripe\Assets\Upload_Validator:
class: SilverStripe\MimeValidator\MimeUploadValidator
31 changes: 31 additions & 0 deletions app/_config/mysite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
Name: myproject
---
SilverStripe\Core\Manifest\ModuleManifest:
project: app


---
Name: my-project-assetsflysystem
After: '#assetsflysystem'
---
# SilverStripe 4.4 changes the way files are resolved. `silverstripe-assets` resolves files using a variety of formats
# by default. When starting a brand new project on SilverStripe 4.4 or greater, those extra formats are not needed and
# will slowdown file resolution requests a bit. This config removes those redundant formats.
SilverStripe\Core\Injector\Injector:
# Define public resolution strategy
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.public:
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
properties:
ResolutionFileIDHelpers:
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
VersionedStage: Live
# Define protected resolution strategy
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.protected:
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
properties:
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
ResolutionFileIDHelpers:
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
VersionedStage: Stage
8 changes: 8 additions & 0 deletions app/_config/theme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
Name: mytheme
---
SilverStripe\View\SSViewer:
themes:
- '$public'
- 'simple'
- '$default'
13 changes: 13 additions & 0 deletions app/src/Page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace {

use SilverStripe\CMS\Model\SiteTree;

class Page extends SiteTree
{
private static $db = [];

private static $has_one = [];
}
}
33 changes: 33 additions & 0 deletions app/src/PageController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace {

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>
* [
* '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 = [];

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/
}
}
}
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "silverstripe/installer",
"type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=7.1.0",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "4.6.1@stable",
"silverstripe-themes/simple": "~3.2.0",
"silverstripe/login-forms": "4.1.2@stable",
"silverstripe/crontask": "^2.1",
"silverstripe/dynamodb": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"sminnee/phpunit-mock-objects": "^3.4.5",
"silverstripe/behat-extension": "^4.2"
},
"extra": {
"resources-dir": "_resources",
"project-files-installed": [
"app/.htaccess",
"app/_config.php",
"app/_config/mimevalidator.yml",
"app/_config/mysite.yml",
"app/src/Page.php",
"app/src/PageController.php"
],
"public-files-installed": [
".htaccess",
"index.php",
"web.config"
]
},
"config": {
"process-timeout": 600
},
"prefer-stable": true,
"minimum-stability": "dev"
}
Loading

0 comments on commit fd05b59

Please sign in to comment.