├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── build.dist.xml
├── build.properties.dist
├── build.xml
├── composer.json
├── composer.lock
├── config
└── sync
│ ├── .htaccess
│ ├── README.txt
│ ├── block.block.seven_local_actions.yml
│ ├── block.block.seven_local_tasks.yml
│ ├── block.block.seven_messages.yml
│ ├── block.block.seven_page_title.yml
│ ├── block.block.stark_admin.yml
│ ├── block.block.stark_branding.yml
│ ├── block.block.stark_local_actions.yml
│ ├── block.block.stark_local_tasks.yml
│ ├── block.block.stark_login.yml
│ ├── block.block.stark_messages.yml
│ ├── block.block.stark_page_title.yml
│ ├── block.block.stark_tools.yml
│ ├── core.base_field_override.node.todo.promote.yml
│ ├── core.date_format.fallback.yml
│ ├── core.date_format.html_date.yml
│ ├── core.date_format.html_datetime.yml
│ ├── core.date_format.html_month.yml
│ ├── core.date_format.html_time.yml
│ ├── core.date_format.html_week.yml
│ ├── core.date_format.html_year.yml
│ ├── core.date_format.html_yearless_date.yml
│ ├── core.date_format.long.yml
│ ├── core.date_format.medium.yml
│ ├── core.date_format.short.yml
│ ├── core.entity_form_display.node.todo.default.yml
│ ├── core.entity_form_mode.user.register.yml
│ ├── core.entity_view_display.node.todo.default.yml
│ ├── core.entity_view_display.node.todo.teaser.yml
│ ├── core.entity_view_mode.node.full.yml
│ ├── core.entity_view_mode.node.rss.yml
│ ├── core.entity_view_mode.node.search_index.yml
│ ├── core.entity_view_mode.node.search_result.yml
│ ├── core.entity_view_mode.node.teaser.yml
│ ├── core.entity_view_mode.user.compact.yml
│ ├── core.entity_view_mode.user.full.yml
│ ├── core.extension.yml
│ ├── core.menu.static_menu_link_overrides.yml
│ ├── dblog.settings.yml
│ ├── field.field.node.todo.field_done.yml
│ ├── field.settings.yml
│ ├── field.storage.node.body.yml
│ ├── field.storage.node.field_done.yml
│ ├── field_ui.settings.yml
│ ├── file.settings.yml
│ ├── filter.format.plain_text.yml
│ ├── filter.settings.yml
│ ├── hal.settings.yml
│ ├── node.settings.yml
│ ├── node.type.todo.yml
│ ├── rest.resource.dvt_todos_resource.yml
│ ├── rest.settings.yml
│ ├── serialization.settings.yml
│ ├── system.action.node_delete_action.yml
│ ├── system.action.node_make_sticky_action.yml
│ ├── system.action.node_make_unsticky_action.yml
│ ├── system.action.node_promote_action.yml
│ ├── system.action.node_publish_action.yml
│ ├── system.action.node_save_action.yml
│ ├── system.action.node_unpromote_action.yml
│ ├── system.action.node_unpublish_action.yml
│ ├── system.action.user_block_user_action.yml
│ ├── system.action.user_cancel_user_action.yml
│ ├── system.action.user_unblock_user_action.yml
│ ├── system.authorize.yml
│ ├── system.cron.yml
│ ├── system.date.yml
│ ├── system.diff.yml
│ ├── system.file.yml
│ ├── system.image.gd.yml
│ ├── system.image.yml
│ ├── system.logging.yml
│ ├── system.mail.yml
│ ├── system.maintenance.yml
│ ├── system.menu.account.yml
│ ├── system.menu.admin.yml
│ ├── system.menu.footer.yml
│ ├── system.menu.main.yml
│ ├── system.menu.tools.yml
│ ├── system.performance.yml
│ ├── system.rss.yml
│ ├── system.site.yml
│ ├── system.theme.global.yml
│ ├── system.theme.yml
│ ├── text.settings.yml
│ ├── update.settings.yml
│ ├── user.flood.yml
│ ├── user.mail.yml
│ ├── user.role.anonymous.yml
│ ├── user.role.authenticated.yml
│ └── user.settings.yml
├── drush
├── README.md
└── policy.drush.inc
├── frontend
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── nightwatch.json
├── package-lock.json
├── package.json
├── public
│ ├── favicon-32x32.png
│ └── v.png
├── src
│ ├── App.vue
│ ├── api
│ │ ├── axiosInterceptor.js
│ │ └── index.js
│ ├── components
│ │ ├── LoginForm.vue
│ │ ├── TodoCounter.vue
│ │ ├── TodoForm.vue
│ │ ├── TodoList.vue
│ │ └── TodoListItem.vue
│ ├── main.js
│ ├── router
│ │ ├── index.js
│ │ └── routerInterceptor.js
│ └── store
│ │ ├── index.js
│ │ └── modules
│ │ ├── todos
│ │ ├── TodosActions.js
│ │ ├── TodosMutations.js
│ │ └── index.js
│ │ └── user
│ │ ├── UserActions.js
│ │ ├── UserMutations.js
│ │ └── index.js
├── tests
│ └── nightwatch
│ │ ├── assertions
│ │ └── .gitkeep
│ │ ├── commands
│ │ └── .gitkeep
│ │ ├── data
│ │ ├── .gitkeep
│ │ └── global.js
│ │ ├── pages
│ │ ├── login.js
│ │ └── singlePage.js
│ │ └── tests
│ │ ├── login.js
│ │ └── pending.js
├── webpack.config.js
└── yarn.lock
├── phpcs-ruleset.xml.dist
├── phpunit.xml.dist
├── scripts
├── composer
│ └── ScriptHandler.php
├── travis-ci
│ └── run-test.sh
└── workflow
│ ├── default-content.sh
│ └── project-install.sh
├── src
└── Phing
│ ├── PhpCodeSnifferConfigurationTask.php
│ └── PhpUnitConfigurationTask.php
├── tests
├── behat
├── behat.yml.dist
└── features
│ ├── authentication.feature
│ └── bootstrap
│ └── FeatureContext.php
└── web
├── .csslintrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.json
├── .gitattributes
├── .ht.router.php
├── .htaccess
├── autoload.php
├── index.php
├── modules
└── custom
│ ├── dvt_default_content
│ ├── README.md
│ ├── config
│ │ └── optional
│ │ │ ├── migrate_plus.migration.dvt_default_content__node__todo.yml
│ │ │ ├── migrate_plus.migration.dvt_default_content_user.yml
│ │ │ └── migrate_plus.migration_group.default_content.yml
│ ├── default_content
│ │ ├── files
│ │ │ └── .gitkeep
│ │ ├── node__todo.csv
│ │ └── user.csv
│ ├── dvt_default_content.info.yml
│ ├── dvt_default_content.module
│ └── src
│ │ └── Plugin
│ │ └── migrate
│ │ └── process
│ │ └── FileImport.php
│ └── dvt_rest_api
│ ├── README.md
│ ├── config
│ └── install
│ │ └── rest.resource.dvt_todos_resource.yml
│ ├── dvt_rest_api.info.yml
│ ├── dvt_rest_api.module
│ └── src
│ └── Plugin
│ └── rest
│ └── resource
│ └── TodoResource.php
├── profiles
└── .gitkeep
├── robots.txt
├── sites
├── default
│ ├── default.services.yml
│ ├── default.settings.php
│ ├── example.settings.local.php
│ ├── services.yml
│ └── settings.php
├── development.services.yml
└── example.sites.php
├── themes
└── .gitkeep
├── update.php
└── web.config
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore directories generated by Composer
2 | /bin/
3 | /drush/contrib/
4 | /vendor/
5 | /web/core/
6 | /web/libraries/
7 | /web/modules/contrib/
8 | /web/profiles/contrib/
9 | /web/themes/contrib/
10 |
11 | # Ignore sensitive information
12 | /web/sites/*/settings.local.php
13 |
14 | # Ignore Drupal's file directory
15 | /web/sites/*/files/
16 |
17 | # Ignore SimpleTest multi-site environment.
18 | /web/sites/simpletest/
19 |
20 | # Ignore environment specific settings
21 | /settings.local.php
22 | /build.local.xml
23 | /build.properties.local
24 | /phpcs.xml
25 | /tests/behat.yml
26 | /web/phpunit.xml
27 |
28 | # Ignore files generated by PhpStorm
29 | /.idea/
30 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 7.1
5 |
6 | sudo: false
7 |
8 | mysql:
9 | database: myproject
10 | username: root
11 | encoding: utf8
12 |
13 | env:
14 | - TEST=PHP_CodeSniffer
15 |
16 | before_install:
17 | # Remove Xdebug as we don't need it and it causes "PHP Fatal error: Maximum
18 | # function nesting level of '256' reached". We don't care if that file exists
19 | # or not on PHP 7.
20 | - phpenv config-rm xdebug.ini || true
21 |
22 | # Update composer.
23 | - composer --verbose self-update
24 |
25 | # Create database.
26 | - mysql -e 'create database myproject'
27 |
28 | install:
29 | # Install Composer dependencies.
30 | - composer --verbose install
31 |
32 | # Define build properties for the local test environment.
33 | - echo -e "drupal.base_url = http://localhost:8888\n" > build.properties.local
34 |
35 | # Build the project.
36 | - ./vendor/bin/phing build-dev
37 |
38 | # Install Drupal. This is not needed when doing a coding standards check.
39 | - test ${TEST} == "PHP_CodeSniffer" || ./vendor/bin/phing install-dev
40 |
41 | # Start a web server on port 8888 in the background.
42 | - cd $TRAVIS_BUILD_DIR/web
43 | - nohup php -S localhost:8888 > /dev/null 2>&1 &
44 |
45 | # Wait until the web server is responding.
46 | - until curl -s localhost:8888; do true; done > /dev/null
47 | - cd $TRAVIS_BUILD_DIR
48 |
49 | script: ./scripts/travis-ci/run-test.sh ${TEST}
50 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Drupal + vuejs todo
2 | [](https://travis-ci.org/alvar0hurtad0/drupal-vuejs-todo)
3 |
4 | This project is based on [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project)
5 | ## Short overview
6 | This is an example about how to build a decoupled drupal + vuejs application. Even it's not ready for production is a
7 | good starting point if you just need to understand how this kind of application can work together.
8 |
9 | Most of the backend lives on the `web` folder and the fronted lives on the `frontend` folder.
10 |
11 | After the installation you can expect a drupal website just needed to store the data and manage user permissions, and a
12 | javascript application that is the real interface for the users.
13 |
14 | ## Install backend
15 |
16 | * Make sure you have composer and all the stuff to run a drupal on you host. PHP 7.1 or higher is required
17 | (https://www.drupal.org/docs/8/system-requirements)
18 | * Copy `web/sites/default/example.settings.local.php` into `web/sites/default/settings.local.php` and customize the
19 | values (at least related with database)
20 | ```
21 | cp web/sites/default/example.settings.local.php web/sites/default/settings.local.php
22 | vim web/sites/default/settings.local.php
23 | ```
24 | * Run `composer project-install`
25 | * Make all the changes required for your webserver to make `http://drupal-vuejs-todo.localhost` serve the `web` folder
26 | of this repo.
27 |
28 | ## Install frontend
29 | ###Requirements:
30 | * Node js v9.8.0: Follow this steps to install:
31 | https://nodejs.org/en/download/package-manager/
32 |
33 | You can upgrade your version of nodejs with those commands
34 | ```
35 | sudo npm cache clean -f
36 | sudo npm install -g n
37 | sudo n stable
38 | ```
39 |
40 | * Yarn 1.6.0 (optional):
41 | https://yarnpkg.com/en/docs/install/
42 |
43 | ###Run the dev environment:
44 | * Go to `frontend` folder
45 | * run `npm install` or `yarn install`
46 | * run `npm run dev` or `yarn dev`
47 |
48 | ## Expected result after install the project
49 | * 4 users are created (user/password):
50 | * user1/user1 (with 3 todos)
51 | * user2/user2 (with 1 todo)
52 | * user3/user3
53 | * user4/user4
54 |
55 | For more info about the created default content, please check this link
56 | https://github.com/alvar0hurtad0/drupal-vuejs-todo/tree/master/web/modules/custom/dvt_default_content/default_content
57 |
58 | * Admin user for backed is admin/admin
59 |
60 | ## Troubleshooting
61 | ### I can't serve the drupal in http://drupal-vuejs-todo.localhost
62 | Just change the {BASE_API_URL} here:
63 | https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/webpack.config.js#L91
64 |
65 | ### Yarn can not find install on Ubuntu
66 | There's a problem with package cmdtest on `ubuntu` that throws this error:
67 | ```
68 | 00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
69 | ```
70 |
71 | you can just try npm or remove old package and isntall the good one:
72 | ```
73 | sudo apt remove cmdtest
74 | sudo apt remove yarn
75 | curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
76 | echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
77 | sudo apt-get update && sudo apt-get install yarn
78 | ```
79 | ### I'm very interested but I can't do it run
80 | I can provide some basic suppor on twitter: https://twitter.com/alvar0hurtad0
81 |
--------------------------------------------------------------------------------
/build.dist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
46 |
47 |
48 |
49 |
50 |
51 | ${website.profile.name}
52 |
53 | install_configure_form.update_status_module='array(FALSE,FALSE)'
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
149 |
150 |
151 | user
152 |
153 |
154 |
155 |
156 |
157 |
163 |
164 |
165 | ${drupal.demo.user}
166 |
167 |
173 | ${drupal.demo.user}
174 | ${drupal.demo.user}
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
232 | ${module}
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
261 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
277 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
315 |
316 |
320 |
321 |
325 |
326 |
330 |
331 |
335 |
336 |
337 |
--------------------------------------------------------------------------------
/build.properties.dist:
--------------------------------------------------------------------------------
1 | # Drupal configuration
2 | # --------------------
3 |
4 | # The project name.
5 | project.name = myproject
6 |
7 | # The install profile to use.
8 | website.profile.name = standard
9 |
10 | # The site name.
11 | website.site.name = MyDrupalProject
12 |
13 | # Database settings.
14 | drupal.db.type = mysql
15 | drupal.db.name = ${project.name}
16 | drupal.db.user = root
17 | drupal.db.password =
18 | drupal.db.host = 127.0.0.1
19 | drupal.db.port = 3306
20 | drupal.db.url = ${drupal.db.type}://${drupal.db.user}:${drupal.db.password}@${drupal.db.host}:${drupal.db.port}/${drupal.db.name}
21 |
22 | # Admin user.
23 | drupal.admin.username = admin
24 | drupal.admin.password = admin
25 | drupal.admin.email = admin@example.com
26 |
27 | # Comma-separated list of demo users to create. The username and password will
28 | # be taken from the role. A normal authenticated user with username and password
29 | # 'user' will also be created.
30 | drupal.demo.users = administrator
31 |
32 | # The base URL. This is used for doing functional tests in Behat and PHPUnit.
33 | drupal.base_url = http://localhost
34 |
35 |
36 | # Paths
37 | # -----
38 |
39 | # Paths to executables.
40 | composer.bin = ${project.basedir}/vendor/bin/composer
41 | drush.bin = ${project.basedir}/vendor/bin/drush
42 | phing.bin = ${project.basedir}/vendor/bin/phing
43 |
44 | # Files and directories inside the Drupal installation.
45 | website.drupal.dir = ${project.basedir}/web
46 |
47 | website.sites.dir = ${website.drupal.dir}/sites
48 | website.site.dir = ${website.drupal.sites.dir}/all
49 |
50 | website.settings.dir = ${website.sites.dir}/default
51 | website.settings.php = ${website.settings.dir}/settings.php
52 | website.settings.local.php.example = ${website.sites.dir}/example.settings.local.php
53 | website.settings.local.php = ${website.settings.dir}/settings.local.php
54 | website.services.yml = ${website.settings.dir}/services.yml
55 | website.services.yml.default = ${website.settings.dir}/default.services.yml
56 | website.files.dir = ${website.settings.dir}/files
57 |
58 | website.modules.dir = ${website.drupal.dir}/modules
59 | website.profiles.dir = ${website.drupal.dir}/profiles
60 | website.themes.dir = ${website.drupal.dir}/themes
61 |
62 |
63 | # Behat configuration
64 | # -------------------
65 |
66 | # The location of the Behat executable.
67 | behat.bin = ${project.basedir}/vendor/bin/behat
68 |
69 | # The location of the Behat tests.
70 | behat.dir = ${project.basedir}/tests
71 |
72 | # The location of the Behat configuration template.
73 | behat.yml.template = ${behat.dir}/behat.yml.dist
74 |
75 | # The location of the generated Behat configuration file.
76 | behat.yml.path = ${behat.dir}/behat.yml
77 |
78 | # The base URL to use in Behat tests.
79 | behat.base_url = ${drupal.base_url}
80 |
81 | # The browser to use for testing, either 'firefox' or 'chrome'.
82 | behat.browser_name = chrome
83 |
84 | # The port of the webdriver host (e.g. Selenium or PhantomJS).
85 | behat.webdriver_port = 4444
86 |
87 | # The URL of the webdriver host (e.g. Selenium or PhantomJS).
88 | behat.webdriver_url = http://localhost:${behat.webdriver_port}/wd/hub
89 |
90 | # The location to search for Behat subcontexts.
91 | behat.subcontexts.path = ${website.modules.dir}
92 |
93 | # The output format to use for Behat tests, either 'progress' or 'pretty'.
94 | behat.formatter.name = progress
95 |
96 | # The location of the test files.
97 | behat.files.path = ${behat.dir}/fixtures/files
98 |
99 |
100 | # PHP CodeSniffer configuration
101 | # -----------------------------
102 |
103 | # The file extensions to test.
104 | phpcs.extensions = php inc module install info test profile theme css js
105 |
106 | # The default configuration file to generate.
107 | phpcs.config = ${project.basedir}/phpcs.xml
108 |
109 | # The coding standard to use. If you want to customize the rules, make a copy of
110 | # the file and name it 'phpcs-ruleset.xml'. Then copy this property to your
111 | # build.properties file and remove the '.dist' suffix.
112 | phpcs.standard = ${project.basedir}/phpcs-ruleset.xml.dist
113 |
114 | # Paths to check, delimited by semicolons.
115 | phpcs.files = ${website.modules.dir};${website.profiles.dir};${website.themes.dir}
116 |
117 | # Paths to ignore, delimited by semicolons.
118 | phpcs.ignore = ${website.modules.dir}/contrib
119 |
120 | # The report format. For example 'full', 'summary', 'diff', 'xml', 'json'.
121 | phpcs.report = full
122 |
123 | # Whether or not to show sniff codes in the report.
124 | phpcs.sniffcodes = 0
125 |
126 | # Whether or not to show the progress of the run.
127 | phpcs.progress = 1
128 |
129 | # The location of the file containing the global configuration options.
130 | phpcs.global.config = ${project.basedir}/vendor/squizlabs/php_codesniffer/CodeSniffer.conf
131 |
132 | # Whether or not to run a coding standards check before doing a git push. Note
133 | # that this will abort the push if the coding standards check fails.
134 | phpcs.prepush.enable = 0
135 |
136 | # The source and destination paths of the git pre-push hook.
137 | phpcs.prepush.source = ${project.basedir}/vendor/pfrenssen/phpcs-pre-push/pre-push
138 | phpcs.prepush.destination = ${project.basedir}/.git/hooks/pre-push
139 |
140 |
141 | # PHPUnit configuration
142 | # ---------------------
143 |
144 | # The path to the configuration file template.
145 | phpunit.dist = ${project.basedir}/phpunit.xml.dist
146 |
147 | # The path to the generated configuration file. This is typically inside the web
148 | # root.
149 | phpunit.config = ${website.drupal.dir}/phpunit.xml
150 |
151 | # The name to give to the test suite of the project.
152 | phpunit.testsuite.name = ${project.name}
153 |
154 | # Comma-separated list of directories containing tests to execute. These are
155 | # relative to the Drupal root.
156 | phpunit.directories = ./modules/custom,./profiles,./themes/custom
157 |
158 | # Comma-separated list of test files to execute. These are relative to the
159 | # Drupal root.
160 | phpunit.files =
161 |
162 | # The base URL to use in functional tests.
163 | phpunit.base_url = ${drupal.base_url}
164 |
165 | # The database URL to use in kernel tests and functional tests.
166 | phpunit.db_url = ${drupal.db.url}
167 |
168 | # The path to the directory where HTML output from browsertests is stored.
169 | phpunit.browsertest_output_dir = ${website.sites.dir}/simpletest/browser_output
170 |
171 | # The path to the file that lists HTML output from browsertests.
172 | phpunit.browsertest_output_file = ${phpunit.browsertest_output_dir}/outputfile.txt
173 |
174 |
175 | # Development options
176 | # -------------------
177 |
178 | # Development modules to enable.
179 | drupal.modules.dev = config_update devel field_ui menu_ui views_ui
180 |
181 | # Verbosity of Drush commands. Set to 'yes' for verbose output.
182 | drush.verbose = no
183 |
184 | # Redirect outgoing e-mail to disk. This prevents e-mail from being
185 | # accidentally sent out on development machines. The mails can be found in the
186 | # folder temporary://devel-mails. This requires the devel module to be enabled.
187 | drupal.redirect.email = yes
188 |
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pfrenssen/drupal-project",
3 | "description": "Project template for Drupal 8 projects with Composer, Phing and Behat",
4 | "type": "project",
5 | "license": "GPL-2.0-or-later",
6 | "authors": [
7 | {
8 | "name": "",
9 | "role": ""
10 | }
11 | ],
12 | "repositories": [
13 | {
14 | "type": "composer",
15 | "url": "https://packages.drupal.org/8"
16 | },
17 | {
18 | "type": "package",
19 | "package": {
20 | "name": "pfrenssen/phpcs-pre-push",
21 | "version": "1.0",
22 | "type": "git-hook",
23 | "source": {
24 | "url": "https://gist.github.com/498fc52fea3f965f6640.git",
25 | "type": "git",
26 | "reference": "master"
27 | }
28 | }
29 | },
30 | {
31 | "type": "vcs",
32 | "url": "https://git.drupal.org/project/phingdrushtask.git"
33 | }
34 | ],
35 | "require": {
36 | "php": ">=5.5.9",
37 | "composer/composer": "~1.0",
38 | "composer/installers": "^1.2",
39 | "cweagans/composer-patches": "^1.6",
40 | "drupal-composer/drupal-scaffold": "^2.2",
41 | "drupal/console": "^1.0.2",
42 | "drupal/core": "^8.5",
43 | "drupal/restui": "^1.15",
44 | "drush/drush": "^8.0.0",
45 | "webflo/drupal-finder": "^1.0.0",
46 | "webmozart/path-util": "^2.3"
47 | },
48 | "require-dev": {
49 | "behat/mink": "~1.7",
50 | "behat/mink-goutte-driver": "~1.2",
51 | "behat/mink-selenium2-driver": "dev-master#721cbbaf37f71434f6acb604dc3a17a6a9be0c4c",
52 | "drupal/coder": "~8.2.7",
53 | "drupal/config_update": "1.*@dev",
54 | "drupal/devel": "1.*@dev",
55 | "drupal/drupal-extension": "~3.0",
56 | "drupal/migrate_plus": "4.0.0-beta3",
57 | "drupal/migrate_source_csv": "^2.1",
58 | "drupal/migrate_tools": "^4.0",
59 | "drupal/phingdrushtask": "dev-7.x-2.x",
60 | "jcalderonzumba/gastonjs": "^1.1@dev",
61 | "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
62 | "mikey179/vfsStream": "~1.2",
63 | "pfrenssen/phpcs-pre-push": "1.0",
64 | "phing/phing": "~2.10",
65 | "phpunit/phpunit": ">=4.8.28 <5",
66 | "symfony/css-selector": "~2.8|~3.0|~4.0",
67 | "webflo/drupal-core-require-dev": "~8.4"
68 | },
69 | "conflict": {
70 | "drupal/drupal": "*"
71 | },
72 | "minimum-stability": "dev",
73 | "prefer-stable": true,
74 | "config": {
75 | "sort-packages": true,
76 | "platform": {
77 | "php": "7.1"
78 | }
79 | },
80 | "autoload": {
81 | "psr-4": {
82 | "Drupal\\DrupalProject\\": "tests/src",
83 | "DrupalProject\\": "src"
84 | },
85 | "classmap": [
86 | "scripts/composer/ScriptHandler.php"
87 | ]
88 | },
89 | "scripts": {
90 | "default-content": [
91 | "./scripts/workflow/default-content.sh"
92 | ],
93 | "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
94 | "project-install": [
95 | "./scripts/workflow/project-install.sh"
96 | ],
97 | "pre-install-cmd": [
98 | "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
99 | ],
100 | "pre-update-cmd": [
101 | "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
102 | ],
103 | "post-install-cmd": [
104 | "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
105 | ],
106 | "post-update-cmd": [
107 | "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
108 | ]
109 | },
110 | "extra": {
111 | "installer-paths": {
112 | "web/core": ["type:drupal-core"],
113 | "web/libraries/{$name}": ["type:drupal-library"],
114 | "web/modules/contrib/{$name}": ["type:drupal-module"],
115 | "web/profiles/contrib/{$name}": ["type:drupal-profile"],
116 | "web/themes/contrib/{$name}": ["type:drupal-theme"],
117 | "drush/contrib/{$name}": ["type:drupal-drush"]
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/config/sync/.htaccess:
--------------------------------------------------------------------------------
1 | # Deny all requests from Apache 2.4+.
2 |
3 | Require all denied
4 |
5 |
6 | # Deny all requests from Apache 2.0-2.2.
7 |
8 | Deny from all
9 |
10 | # Turn off all options we don't need.
11 | Options -Indexes -ExecCGI -Includes -MultiViews
12 |
13 | # Set the catch-all handler to prevent scripts from being executed.
14 | SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
15 |
16 | # Override the handler again if we're run later in the evaluation list.
17 | SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
18 |
19 |
20 | # If we know how to do it safely, disable the PHP engine entirely.
21 |
22 | php_flag engine off
23 |
--------------------------------------------------------------------------------
/config/sync/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync. For information about deploying configuration between servers, see https://www.drupal.org/documentation/administer/config
--------------------------------------------------------------------------------
/config/sync/block.block.seven_local_actions.yml:
--------------------------------------------------------------------------------
1 | uuid: 342589ce-a2d4-4346-adaa-8d097c024731
2 | langcode: en
3 | status: true
4 | dependencies:
5 | theme:
6 | - seven
7 | _core:
8 | default_config_hash: PffmQ-ABSz5tFjWmVsR7NesunDnEivvopnJnBjl8KNE
9 | id: seven_local_actions
10 | theme: seven
11 | region: content
12 | weight: -10
13 | provider: null
14 | plugin: local_actions_block
15 | settings:
16 | id: local_actions_block
17 | label: 'Primary admin actions'
18 | provider: core
19 | label_display: '0'
20 | visibility: { }
21 |
--------------------------------------------------------------------------------
/config/sync/block.block.seven_local_tasks.yml:
--------------------------------------------------------------------------------
1 | uuid: 68e7c1c4-57f3-426f-b703-683db8cfc272
2 | langcode: en
3 | status: true
4 | dependencies:
5 | theme:
6 | - seven
7 | _core:
8 | default_config_hash: c-06bbElRY5sKmglk74ppgTW93Et4-EJFyNiUZMb8JY
9 | id: seven_local_tasks
10 | theme: seven
11 | region: content
12 | weight: -20
13 | provider: null
14 | plugin: local_tasks_block
15 | settings:
16 | id: local_tasks_block
17 | label: Tabs
18 | provider: core
19 | label_display: '0'
20 | primary: true
21 | secondary: true
22 | visibility: { }
23 |
--------------------------------------------------------------------------------
/config/sync/block.block.seven_messages.yml:
--------------------------------------------------------------------------------
1 | uuid: b03b4897-25b4-400d-bac9-928cc0484402
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - system
7 | theme:
8 | - seven
9 | _core:
10 | default_config_hash: 5MNdk3fpMKx_xxBTcz2T11DL4XEU1H5SgHl8BsYdFsA
11 | id: seven_messages
12 | theme: seven
13 | region: highlighted
14 | weight: 0
15 | provider: null
16 | plugin: system_messages_block
17 | settings:
18 | id: system_messages_block
19 | label: 'Status messages'
20 | provider: system
21 | label_display: '0'
22 | visibility: { }
23 |
--------------------------------------------------------------------------------
/config/sync/block.block.seven_page_title.yml:
--------------------------------------------------------------------------------
1 | uuid: 4fd21e36-6abe-4bc1-b0ba-7686d8f931b9
2 | langcode: en
3 | status: true
4 | dependencies:
5 | theme:
6 | - seven
7 | _core:
8 | default_config_hash: 8yptDf6WrXxeyevUz4nP5vfr7BtxQqCBMninhV2IJ1g
9 | id: seven_page_title
10 | theme: seven
11 | region: content
12 | weight: -30
13 | provider: null
14 | plugin: page_title_block
15 | settings:
16 | id: page_title_block
17 | label: 'Page title'
18 | provider: core
19 | label_display: '0'
20 | visibility: { }
21 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_admin.yml:
--------------------------------------------------------------------------------
1 | uuid: 7f512421-e0f8-437d-a8ec-b6c49f39c182
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - system.menu.admin
7 | module:
8 | - system
9 | theme:
10 | - stark
11 | _core:
12 | default_config_hash: DWAB7HaAfAJerAmyT8B2K-6qxicu9n0PcKVpDr--N4c
13 | id: stark_admin
14 | theme: stark
15 | region: sidebar_first
16 | weight: 1
17 | provider: null
18 | plugin: 'system_menu_block:admin'
19 | settings:
20 | id: 'system_menu_block:admin'
21 | label: Administration
22 | provider: system
23 | label_display: visible
24 | level: 1
25 | depth: 0
26 | visibility: { }
27 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_branding.yml:
--------------------------------------------------------------------------------
1 | uuid: 5036d106-a984-4057-98da-6fb957c6ecbe
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - system
7 | theme:
8 | - stark
9 | _core:
10 | default_config_hash: fRKXNB91UxDvEMkzCR8ZBsawfC6Fqbme2gtobei3gu4
11 | id: stark_branding
12 | theme: stark
13 | region: header
14 | weight: 0
15 | provider: null
16 | plugin: system_branding_block
17 | settings:
18 | id: system_branding_block
19 | label: 'Site branding'
20 | provider: system
21 | label_display: '0'
22 | use_site_logo: true
23 | use_site_name: true
24 | use_site_slogan: true
25 | visibility: { }
26 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_local_actions.yml:
--------------------------------------------------------------------------------
1 | uuid: b5d1a09e-9b44-4d90-b630-5227b5387ab6
2 | langcode: en
3 | status: true
4 | dependencies:
5 | theme:
6 | - stark
7 | _core:
8 | default_config_hash: PffmQ-ABSz5tFjWmVsR7NesunDnEivvopnJnBjl8KNE
9 | id: stark_local_actions
10 | theme: stark
11 | region: content
12 | weight: -10
13 | provider: null
14 | plugin: local_actions_block
15 | settings:
16 | id: local_actions_block
17 | label: 'Primary admin actions'
18 | provider: core
19 | label_display: '0'
20 | visibility: { }
21 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_local_tasks.yml:
--------------------------------------------------------------------------------
1 | uuid: e044ddab-4f8c-47f3-b101-190268b29f2a
2 | langcode: en
3 | status: true
4 | dependencies:
5 | theme:
6 | - stark
7 | _core:
8 | default_config_hash: c-06bbElRY5sKmglk74ppgTW93Et4-EJFyNiUZMb8JY
9 | id: stark_local_tasks
10 | theme: stark
11 | region: content
12 | weight: -20
13 | provider: null
14 | plugin: local_tasks_block
15 | settings:
16 | id: local_tasks_block
17 | label: Tabs
18 | provider: core
19 | label_display: '0'
20 | primary: true
21 | secondary: true
22 | visibility: { }
23 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_login.yml:
--------------------------------------------------------------------------------
1 | uuid: 0c2bc74e-f066-4df9-a638-f587a2ae6788
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - user
7 | theme:
8 | - stark
9 | _core:
10 | default_config_hash: 4QlSnWBcxxKMIFRM8sbu_MjSkcp3NjGgnVrc-lynQHI
11 | id: stark_login
12 | theme: stark
13 | region: sidebar_first
14 | weight: 0
15 | provider: null
16 | plugin: user_login_block
17 | settings:
18 | id: user_login_block
19 | label: 'User login'
20 | provider: user
21 | label_display: visible
22 | visibility: { }
23 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_messages.yml:
--------------------------------------------------------------------------------
1 | uuid: 00ea40d7-8905-465d-9a37-907d07f7a558
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - system
7 | theme:
8 | - stark
9 | _core:
10 | default_config_hash: 5MNdk3fpMKx_xxBTcz2T11DL4XEU1H5SgHl8BsYdFsA
11 | id: stark_messages
12 | theme: stark
13 | region: highlighted
14 | weight: 0
15 | provider: null
16 | plugin: system_messages_block
17 | settings:
18 | id: system_messages_block
19 | label: 'Status messages'
20 | provider: system
21 | label_display: '0'
22 | visibility: { }
23 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_page_title.yml:
--------------------------------------------------------------------------------
1 | uuid: 745dae4e-891a-4ac9-a800-5c58a51dfc1f
2 | langcode: en
3 | status: true
4 | dependencies:
5 | theme:
6 | - stark
7 | _core:
8 | default_config_hash: 8yptDf6WrXxeyevUz4nP5vfr7BtxQqCBMninhV2IJ1g
9 | id: stark_page_title
10 | theme: stark
11 | region: content
12 | weight: -30
13 | provider: null
14 | plugin: page_title_block
15 | settings:
16 | id: page_title_block
17 | label: 'Page title'
18 | provider: core
19 | label_display: '0'
20 | visibility: { }
21 |
--------------------------------------------------------------------------------
/config/sync/block.block.stark_tools.yml:
--------------------------------------------------------------------------------
1 | uuid: b7421f80-50c0-4bb8-b8d2-900f754cedfd
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - system.menu.tools
7 | module:
8 | - system
9 | theme:
10 | - stark
11 | _core:
12 | default_config_hash: xCOijLdB1-UgXxQ9a0D1_pd8vxNEhfMnxXZc8jYhHjs
13 | id: stark_tools
14 | theme: stark
15 | region: sidebar_first
16 | weight: 0
17 | provider: null
18 | plugin: 'system_menu_block:tools'
19 | settings:
20 | id: 'system_menu_block:tools'
21 | label: Tools
22 | provider: system
23 | label_display: visible
24 | level: 1
25 | depth: 0
26 | visibility: { }
27 |
--------------------------------------------------------------------------------
/config/sync/core.base_field_override.node.todo.promote.yml:
--------------------------------------------------------------------------------
1 | uuid: 6f2b667b-f1a7-4f08-9395-3c6a44c2a02e
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - node.type.todo
7 | id: node.todo.promote
8 | field_name: promote
9 | entity_type: node
10 | bundle: todo
11 | label: 'Promoted to front page'
12 | description: ''
13 | required: false
14 | translatable: true
15 | default_value:
16 | -
17 | value: 0
18 | default_value_callback: ''
19 | settings:
20 | on_label: 'On'
21 | off_label: 'Off'
22 | field_type: boolean
23 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.fallback.yml:
--------------------------------------------------------------------------------
1 | uuid: 3ba91c39-204f-4d18-be91-81c82bc2c1cf
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: 7klS5IWXrwzVaPpYZFAs6wcx8U2FF1X73OfrtTsvuvE
7 | id: fallback
8 | label: 'Fallback date format'
9 | locked: true
10 | pattern: 'D, m/d/Y - H:i'
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_date.yml:
--------------------------------------------------------------------------------
1 | uuid: 135bdd68-ad26-489b-9afb-9cdaf6c48621
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: EOQltUQPmgc6UQ2rcJ4Xi_leCEJj5ui0TR-12duS-Tk
7 | id: html_date
8 | label: 'HTML Date'
9 | locked: true
10 | pattern: Y-m-d
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_datetime.yml:
--------------------------------------------------------------------------------
1 | uuid: 1f55f182-eb0a-4693-aeea-08528b2ce598
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: jxfClwZIRXIdcvMrE--WkcZxDGUVoOIE3Sm2NRZlFuE
7 | id: html_datetime
8 | label: 'HTML Datetime'
9 | locked: true
10 | pattern: 'Y-m-d\TH:i:sO'
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_month.yml:
--------------------------------------------------------------------------------
1 | uuid: fda66e90-99f7-4337-9e9e-e1442ce2906c
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: Z7KuCUwM_WdTNvLcoltuX3_8d-s-8FZkTN6KgNwF0eM
7 | id: html_month
8 | label: 'HTML Month'
9 | locked: true
10 | pattern: Y-m
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_time.yml:
--------------------------------------------------------------------------------
1 | uuid: ec4c076e-157d-40bc-a2f6-dc846b70ac09
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: M7yqicYkU36hRy5p9drAaGBBihhUD1OyujFrAaQ93ZE
7 | id: html_time
8 | label: 'HTML Time'
9 | locked: true
10 | pattern: 'H:i:s'
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_week.yml:
--------------------------------------------------------------------------------
1 | uuid: f95d4c9e-7496-49d7-95f4-bb4462cbd622
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: wKD4WsoV_wFgv2vgI4mcAAFSIzrye17ykzdwrnApkfY
7 | id: html_week
8 | label: 'HTML Week'
9 | locked: true
10 | pattern: Y-\WW
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_year.yml:
--------------------------------------------------------------------------------
1 | uuid: 1114961f-c869-4a07-8ed1-d407cfbf09b5
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: OjekiQuX9RbVQ2_8jOHBL94RgYLePqX7wpfNGgcQzrk
7 | id: html_year
8 | label: 'HTML Year'
9 | locked: true
10 | pattern: 'Y'
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.html_yearless_date.yml:
--------------------------------------------------------------------------------
1 | uuid: 97637d2c-d94a-405b-845d-32c4096fa717
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: 5VpawMrKPEPCkoO4YpPa0TDFO2dgiIHfTziJtwlmUxc
7 | id: html_yearless_date
8 | label: 'HTML Yearless date'
9 | locked: true
10 | pattern: m-d
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.long.yml:
--------------------------------------------------------------------------------
1 | uuid: 077462ae-40f7-471c-a9f8-a483de97ca77
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: og8sWXhBuHbLMw3CoiBEZjgqSyhFBFmcbUW_wLcfNbo
7 | id: long
8 | label: 'Default long date'
9 | locked: false
10 | pattern: 'l, F j, Y - H:i'
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.medium.yml:
--------------------------------------------------------------------------------
1 | uuid: 248f1a83-68fa-48b6-b5d0-f38bf6a1c5be
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: nzL5d024NjXIX_8TlT6uFAu973lmfkmHklJC-2i9rAE
7 | id: medium
8 | label: 'Default medium date'
9 | locked: false
10 | pattern: 'D, m/d/Y - H:i'
11 |
--------------------------------------------------------------------------------
/config/sync/core.date_format.short.yml:
--------------------------------------------------------------------------------
1 | uuid: 4bfded9f-6da7-4256-bf6b-2e77f1737cfa
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: AlzeyytA8InBgxIG9H2UDJYs3CG98Zj6yRsDKmlbZwA
7 | id: short
8 | label: 'Default short date'
9 | locked: false
10 | pattern: 'm/d/Y - H:i'
11 |
--------------------------------------------------------------------------------
/config/sync/core.entity_form_display.node.todo.default.yml:
--------------------------------------------------------------------------------
1 | uuid: 28dc70ca-4ab6-4f52-a7a2-ca798231f90e
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - field.field.node.todo.field_done
7 | - node.type.todo
8 | id: node.todo.default
9 | targetEntityType: node
10 | bundle: todo
11 | mode: default
12 | content:
13 | created:
14 | type: datetime_timestamp
15 | weight: 10
16 | region: content
17 | settings: { }
18 | third_party_settings: { }
19 | field_done:
20 | weight: 121
21 | settings:
22 | display_label: true
23 | third_party_settings: { }
24 | type: boolean_checkbox
25 | region: content
26 | promote:
27 | type: boolean_checkbox
28 | settings:
29 | display_label: true
30 | weight: 15
31 | region: content
32 | third_party_settings: { }
33 | status:
34 | type: boolean_checkbox
35 | settings:
36 | display_label: true
37 | weight: 120
38 | region: content
39 | third_party_settings: { }
40 | sticky:
41 | type: boolean_checkbox
42 | settings:
43 | display_label: true
44 | weight: 16
45 | region: content
46 | third_party_settings: { }
47 | title:
48 | type: string_textfield
49 | weight: -5
50 | region: content
51 | settings:
52 | size: 60
53 | placeholder: ''
54 | third_party_settings: { }
55 | uid:
56 | type: entity_reference_autocomplete
57 | weight: 5
58 | settings:
59 | match_operator: CONTAINS
60 | size: 60
61 | placeholder: ''
62 | region: content
63 | third_party_settings: { }
64 | hidden: { }
65 |
--------------------------------------------------------------------------------
/config/sync/core.entity_form_mode.user.register.yml:
--------------------------------------------------------------------------------
1 | uuid: 00ff467d-9f54-4e14-a0c6-e4849807a1b5
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - user
7 | _core:
8 | default_config_hash: flXhTcp55yLcyy7ZLOhPGKGZobZQJdkAFVWV3LseiuI
9 | id: user.register
10 | label: Register
11 | targetEntityType: user
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_display.node.todo.default.yml:
--------------------------------------------------------------------------------
1 | uuid: 27669c56-e187-4808-ae1f-6eea6ea526f3
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - field.field.node.todo.field_done
7 | - node.type.todo
8 | module:
9 | - user
10 | id: node.todo.default
11 | targetEntityType: node
12 | bundle: todo
13 | mode: default
14 | content:
15 | field_done:
16 | weight: 101
17 | label: above
18 | settings:
19 | format: default
20 | format_custom_false: ''
21 | format_custom_true: ''
22 | third_party_settings: { }
23 | type: boolean
24 | region: content
25 | links:
26 | weight: 100
27 | region: content
28 | hidden: { }
29 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_display.node.todo.teaser.yml:
--------------------------------------------------------------------------------
1 | uuid: 76dbf937-bc44-46c2-949e-63926b491ee0
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - core.entity_view_mode.node.teaser
7 | - node.type.todo
8 | module:
9 | - user
10 | id: node.todo.teaser
11 | targetEntityType: node
12 | bundle: todo
13 | mode: teaser
14 | content:
15 | links:
16 | weight: 100
17 | region: content
18 | hidden:
19 | field_done: true
20 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.node.full.yml:
--------------------------------------------------------------------------------
1 | uuid: b0eee1b5-003d-4c54-923f-002f60dabaa9
2 | langcode: en
3 | status: false
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: ElrtInxGjZd7GaapJ5O9n-ugi2hG2IxFivtgn0tHOsk
9 | id: node.full
10 | label: 'Full content'
11 | targetEntityType: node
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.node.rss.yml:
--------------------------------------------------------------------------------
1 | uuid: 6c8fa897-2492-46b4-85ad-e7998c2157e3
2 | langcode: en
3 | status: false
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: vlYzr-rp2f9NMp-Qlr4sFjlqRq-90mco5-afLNGwCrU
9 | id: node.rss
10 | label: RSS
11 | targetEntityType: node
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.node.search_index.yml:
--------------------------------------------------------------------------------
1 | uuid: 7a9a30e0-2758-4f38-ba43-31fe05e4168f
2 | langcode: en
3 | status: false
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: fVFfJv_GzBRE-wpRHbfD5a3VjnhbEOXG6lvRd3uaccY
9 | id: node.search_index
10 | label: 'Search index'
11 | targetEntityType: node
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.node.search_result.yml:
--------------------------------------------------------------------------------
1 | uuid: 51dbf66f-0b82-4972-98a4-61c8369a8641
2 | langcode: en
3 | status: false
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: 6GCOQ-jP2RbdbHA5YWQ6bT8CfGbqrBYKOSC_XY4E3ZM
9 | id: node.search_result
10 | label: 'Search result highlighting input'
11 | targetEntityType: node
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.node.teaser.yml:
--------------------------------------------------------------------------------
1 | uuid: b4dd5d6b-9951-475e-9826-dda3e71adeee
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: Mz9qWr1kUYK0mjRAGDsr5XS6PvtZ24en_7ndt-pyWe4
9 | id: node.teaser
10 | label: Teaser
11 | targetEntityType: node
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.user.compact.yml:
--------------------------------------------------------------------------------
1 | uuid: edd208c6-19b6-4975-9e00-9de06d6597b5
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - user
7 | _core:
8 | default_config_hash: 71CSAr_LNPcgu6D6jI4INl1KATkahmeyUFBETAWya8g
9 | id: user.compact
10 | label: Compact
11 | targetEntityType: user
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.entity_view_mode.user.full.yml:
--------------------------------------------------------------------------------
1 | uuid: 23a36cf4-2dcc-494d-9e63-0506857ff5bd
2 | langcode: en
3 | status: false
4 | dependencies:
5 | module:
6 | - user
7 | _core:
8 | default_config_hash: mQIF_foYjmnVSr9MpcD4CTaJE_FpO1AyDd_DskztGhM
9 | id: user.full
10 | label: 'User account'
11 | targetEntityType: user
12 | cache: true
13 |
--------------------------------------------------------------------------------
/config/sync/core.extension.yml:
--------------------------------------------------------------------------------
1 | module:
2 | basic_auth: 0
3 | block: 0
4 | breakpoint: 0
5 | config: 0
6 | dblog: 0
7 | devel: 0
8 | dvt_rest_api: 0
9 | dynamic_page_cache: 0
10 | field: 0
11 | field_ui: 0
12 | file: 0
13 | filter: 0
14 | hal: 0
15 | node: 0
16 | page_cache: 0
17 | rest: 0
18 | restui: 0
19 | serialization: 0
20 | system: 0
21 | text: 0
22 | toolbar: 0
23 | update: 0
24 | user: 0
25 | minimal: 1000
26 | theme:
27 | stark: 0
28 | stable: 0
29 | classy: 0
30 | seven: 0
31 | profile: minimal
32 | _core:
33 | default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
34 |
--------------------------------------------------------------------------------
/config/sync/core.menu.static_menu_link_overrides.yml:
--------------------------------------------------------------------------------
1 | definitions: { }
2 | _core:
3 | default_config_hash: jdY7AU0tU-QsjmiOw3W8vwpYMb-By--_MSFgbqKUTYM
4 |
--------------------------------------------------------------------------------
/config/sync/dblog.settings.yml:
--------------------------------------------------------------------------------
1 | row_limit: 1000
2 | _core:
3 | default_config_hash: e883aGsrt1wFrsydlYU584PZONCSfRy0DtkZ9KzHb58
4 |
--------------------------------------------------------------------------------
/config/sync/field.field.node.todo.field_done.yml:
--------------------------------------------------------------------------------
1 | uuid: de8158ba-7feb-4a9a-9737-e710d9b37f74
2 | langcode: en
3 | status: true
4 | dependencies:
5 | config:
6 | - field.storage.node.field_done
7 | - node.type.todo
8 | id: node.todo.field_done
9 | field_name: field_done
10 | entity_type: node
11 | bundle: todo
12 | label: Done
13 | description: ''
14 | required: false
15 | translatable: false
16 | default_value:
17 | -
18 | value: 0
19 | default_value_callback: ''
20 | settings:
21 | on_label: 'On'
22 | off_label: 'Off'
23 | field_type: boolean
24 |
--------------------------------------------------------------------------------
/config/sync/field.settings.yml:
--------------------------------------------------------------------------------
1 | purge_batch_size: 50
2 | _core:
3 | default_config_hash: nJk0TAQBzlNo52ehiHI7bIEPLGi0BYqZvPdEn7Chfu0
4 |
--------------------------------------------------------------------------------
/config/sync/field.storage.node.body.yml:
--------------------------------------------------------------------------------
1 | uuid: 510f1245-c83d-44c4-b63b-a09cf8b6b59e
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | - text
8 | _core:
9 | default_config_hash: EBUo7qOWqaiZaQ_RC9sLY5IoDKphS34v77VIHSACmVY
10 | id: node.body
11 | field_name: body
12 | entity_type: node
13 | type: text_with_summary
14 | settings: { }
15 | module: text
16 | locked: false
17 | cardinality: 1
18 | translatable: true
19 | indexes: { }
20 | persist_with_no_fields: true
21 | custom_storage: false
22 |
--------------------------------------------------------------------------------
/config/sync/field.storage.node.field_done.yml:
--------------------------------------------------------------------------------
1 | uuid: 35758de1-2eec-484f-a9b9-2ba2974d264c
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | id: node.field_done
8 | field_name: field_done
9 | entity_type: node
10 | type: boolean
11 | settings: { }
12 | module: core
13 | locked: false
14 | cardinality: 1
15 | translatable: true
16 | indexes: { }
17 | persist_with_no_fields: false
18 | custom_storage: false
19 |
--------------------------------------------------------------------------------
/config/sync/field_ui.settings.yml:
--------------------------------------------------------------------------------
1 | field_prefix: field_
2 | _core:
3 | default_config_hash: Q1nMi90W6YQxKzZAgJQw7Ag9U4JrsEUwkomF0lhvbIM
4 |
--------------------------------------------------------------------------------
/config/sync/file.settings.yml:
--------------------------------------------------------------------------------
1 | description:
2 | type: textfield
3 | length: 128
4 | icon:
5 | directory: core/modules/file/icons
6 | make_unused_managed_files_temporary: false
7 | _core:
8 | default_config_hash: 0aMkoXYnax5_tHI9C9zHs-K48KJ6K75PHtD9x-0nbgM
9 |
--------------------------------------------------------------------------------
/config/sync/filter.format.plain_text.yml:
--------------------------------------------------------------------------------
1 | uuid: b9757c14-2bdd-4571-ae40-2d7ac1eb3fa9
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: NIKBt6kw_uPhNI0qtR2DnRf7mSOgAQdx7Q94SKMjXbQ
7 | name: 'Plain text'
8 | format: plain_text
9 | weight: 10
10 | filters:
11 | filter_html_escape:
12 | id: filter_html_escape
13 | provider: filter
14 | status: true
15 | weight: -10
16 | settings: { }
17 | filter_url:
18 | id: filter_url
19 | provider: filter
20 | status: true
21 | weight: 0
22 | settings:
23 | filter_url_length: 72
24 | filter_autop:
25 | id: filter_autop
26 | provider: filter
27 | status: true
28 | weight: 0
29 | settings: { }
30 |
--------------------------------------------------------------------------------
/config/sync/filter.settings.yml:
--------------------------------------------------------------------------------
1 | fallback_format: plain_text
2 | always_show_fallback_choice: false
3 | _core:
4 | default_config_hash: FiPjM3WdB__ruFA7B6TLwni_UcZbmek5G4b2dxQItxA
5 |
--------------------------------------------------------------------------------
/config/sync/hal.settings.yml:
--------------------------------------------------------------------------------
1 | link_domain: null
2 | bc_file_uri_as_url_normalizer: false
3 | _core:
4 | default_config_hash: swYtdod4psGvRvRY6OTGagGJPAuknS7WMgn1089yjL0
5 |
--------------------------------------------------------------------------------
/config/sync/node.settings.yml:
--------------------------------------------------------------------------------
1 | use_admin_theme: false
2 | _core:
3 | default_config_hash: 2OMXCScXUOLSYID9-phjO4q36nnnaMWNUlDxEqZzG1U
4 |
--------------------------------------------------------------------------------
/config/sync/node.type.todo.yml:
--------------------------------------------------------------------------------
1 | uuid: c310a421-3289-4f22-8172-0dc1d5ac6e1e
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | name: Todo
6 | type: todo
7 | description: Example
8 | help: ''
9 | new_revision: false
10 | preview_mode: 0
11 | display_submitted: false
12 |
--------------------------------------------------------------------------------
/config/sync/rest.resource.dvt_todos_resource.yml:
--------------------------------------------------------------------------------
1 | uuid: 4ac086c0-19ce-4368-abdf-513657080b5d
2 | langcode: de
3 | status: true
4 | dependencies:
5 | module:
6 | - basic_auth
7 | - dvt_rest_api
8 | - serialization
9 | - user
10 | _core:
11 | default_config_hash: bhzJD3uoRL3Q5FJypDKAtbOnCQ-c4R4PPNwbSnB43lI
12 | id: dvt_todos_resource
13 | plugin_id: dvt_todos_resource
14 | granularity: resource
15 | configuration:
16 | methods:
17 | - GET
18 | - POST
19 | - DELETE
20 | - PATCH
21 | formats:
22 | - json
23 | authentication:
24 | - basic_auth
25 | - cookie
26 |
--------------------------------------------------------------------------------
/config/sync/rest.settings.yml:
--------------------------------------------------------------------------------
1 | bc_entity_resource_permissions: false
2 | _core:
3 | default_config_hash: Jg3_yqsTIZ51KOKp3OV2KDVVrlx3N3OCEfniEse09KE
4 |
--------------------------------------------------------------------------------
/config/sync/serialization.settings.yml:
--------------------------------------------------------------------------------
1 | bc_primitives_as_strings: false
2 | bc_timestamp_normalizer_unix: false
3 | _core:
4 | default_config_hash: 6A1rmsmNf4SJrwCEt_aZyO_kPYuFnIOPC2n5lJiIftA
5 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_delete_action.yml:
--------------------------------------------------------------------------------
1 | uuid: f9848921-772a-4926-bcb5-4fe094920ba9
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: Zx0jD1Klh5tZaGJy8uOeR_2MCu9FDM4xg7TaUJUEbkI
9 | id: node_delete_action
10 | label: 'Delete content'
11 | type: node
12 | plugin: node_delete_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_make_sticky_action.yml:
--------------------------------------------------------------------------------
1 | uuid: ed007912-eaec-42a6-8244-8ffc4a21c374
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: sOb26JSy3fGpWkvR0WYN6_hMqj_6d1rvbvrkzp1yya0
9 | id: node_make_sticky_action
10 | label: 'Make content sticky'
11 | type: node
12 | plugin: node_make_sticky_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_make_unsticky_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 2ef50d07-3520-4832-9357-854e0d90d486
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: lDM9mvIGAu8Sw8rt-uCO4Sr7yX5VPrDPxYcawkbKd6k
9 | id: node_make_unsticky_action
10 | label: 'Make content unsticky'
11 | type: node
12 | plugin: node_make_unsticky_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_promote_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 286910c8-2691-4ef9-a978-ad9fc28eb673
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: N0RDBTqiK4dKoN4p4oW2j0SGWycdHyALUe9M-Ofp89U
9 | id: node_promote_action
10 | label: 'Promote content to front page'
11 | type: node
12 | plugin: node_promote_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_publish_action.yml:
--------------------------------------------------------------------------------
1 | uuid: e6e1d113-226c-43bc-9fd5-c3ba403b6745
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: 2B9uF8NL5gutNKSdPRAhhAsDWFZZG1PJOBmx0aBGd_0
9 | id: node_publish_action
10 | label: 'Publish content'
11 | type: node
12 | plugin: 'entity:publish_action:node'
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_save_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 196347c6-4f19-4b75-b55f-cf39e86fc238
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: LhdsoZPL_pFas2fjaAWue4zvrQ_tEVofLYtcNec-JGM
9 | id: node_save_action
10 | label: 'Save content'
11 | type: node
12 | plugin: 'entity:save_action:node'
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_unpromote_action.yml:
--------------------------------------------------------------------------------
1 | uuid: caf945b3-5050-4fe8-90e5-27bf33dd490d
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: JBptjnfuOMtsdKygklXxoOgeOCTMtQxlkymjnnj-cC0
9 | id: node_unpromote_action
10 | label: 'Remove content from front page'
11 | type: node
12 | plugin: node_unpromote_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.node_unpublish_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 95d19b90-aa96-434e-8d79-7667c1252c3d
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - node
7 | _core:
8 | default_config_hash: C7X8h9FWlwkQ9y5mnU2JzgaZICAdc6HFbPVbhvjlAYE
9 | id: node_unpublish_action
10 | label: 'Unpublish content'
11 | type: node
12 | plugin: 'entity:unpublish_action:node'
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.user_block_user_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 6e1e32b0-e3dd-4c53-92b1-3e0299e2a61d
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - user
7 | _core:
8 | default_config_hash: DyypzTfThX10FFQw-399qPfEbLLyrhXgQrKPVsmAoJ4
9 | id: user_block_user_action
10 | label: 'Block the selected user(s)'
11 | type: user
12 | plugin: user_block_user_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.user_cancel_user_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 685ccf9f-0184-4a18-8514-cc9129ebc330
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - user
7 | _core:
8 | default_config_hash: nvrL9bFilzBvm2bjO9rQnFDpBA7dBBUjShSSt6NS-DU
9 | id: user_cancel_user_action
10 | label: 'Cancel the selected user account(s)'
11 | type: user
12 | plugin: user_cancel_user_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.action.user_unblock_user_action.yml:
--------------------------------------------------------------------------------
1 | uuid: 652bce25-af68-47d0-81cb-eed11241f7b0
2 | langcode: en
3 | status: true
4 | dependencies:
5 | module:
6 | - user
7 | _core:
8 | default_config_hash: SPsUXsR3Rc8d1y3gewzaAKWa1ncea_ywXX3f7LTn7k0
9 | id: user_unblock_user_action
10 | label: 'Unblock the selected user(s)'
11 | type: user
12 | plugin: user_unblock_user_action
13 | configuration: { }
14 |
--------------------------------------------------------------------------------
/config/sync/system.authorize.yml:
--------------------------------------------------------------------------------
1 | filetransfer_default: null
2 | _core:
3 | default_config_hash: z63ds8M4zPrylEgFRkRcOlfcsXWwfITzjD4cj1kRdfg
4 |
--------------------------------------------------------------------------------
/config/sync/system.cron.yml:
--------------------------------------------------------------------------------
1 | threshold:
2 | requirements_warning: 172800
3 | requirements_error: 1209600
4 | logging: 1
5 | _core:
6 | default_config_hash: 5Pw921y1EPfFN98wykliBBLArm51pC-SmrXeYCe7d0Y
7 |
--------------------------------------------------------------------------------
/config/sync/system.date.yml:
--------------------------------------------------------------------------------
1 | country:
2 | default: ''
3 | first_day: 0
4 | timezone:
5 | default: Europe/Berlin
6 | user:
7 | configurable: true
8 | warn: false
9 | default: 0
10 | _core:
11 | default_config_hash: V9UurX2GPT05NWKG9f2GWQqFG2TRG8vczidwjpy7Woo
12 |
--------------------------------------------------------------------------------
/config/sync/system.diff.yml:
--------------------------------------------------------------------------------
1 | context:
2 | lines_leading: 2
3 | lines_trailing: 2
4 | _core:
5 | default_config_hash: 1WanmaEhxW_vM8_5Ktsdntj8MaO9UBHXg0lN603PsWM
6 |
--------------------------------------------------------------------------------
/config/sync/system.file.yml:
--------------------------------------------------------------------------------
1 | allow_insecure_uploads: false
2 | default_scheme: public
3 | path:
4 | temporary: /tmp
5 | temporary_maximum_age: 21600
6 | _core:
7 | default_config_hash: t48gCU9DzYfjb3bAOIqHLzhL0ChBlXh6_5B5Pyo9t8g
8 |
--------------------------------------------------------------------------------
/config/sync/system.image.gd.yml:
--------------------------------------------------------------------------------
1 | jpeg_quality: 75
2 | _core:
3 | default_config_hash: eNXaHfkJJUThHeF0nvkoXyPLRrKYGxgHRjORvT4F5rQ
4 |
--------------------------------------------------------------------------------
/config/sync/system.image.yml:
--------------------------------------------------------------------------------
1 | toolkit: gd
2 | _core:
3 | default_config_hash: durWHaKeBaq4d9Wpi4RqwADj1OufDepcnJuhVLmKN24
4 |
--------------------------------------------------------------------------------
/config/sync/system.logging.yml:
--------------------------------------------------------------------------------
1 | error_level: hide
2 | _core:
3 | default_config_hash: u3-njszl92FaxjrCMiq0yDcjAfcdx72w1zT1O9dx6aA
4 |
--------------------------------------------------------------------------------
/config/sync/system.mail.yml:
--------------------------------------------------------------------------------
1 | interface:
2 | default: php_mail
3 | _core:
4 | default_config_hash: rYgt7uhPafP2ngaN_ZUPFuyI4KdE0zU868zLNSlzKoE
5 |
--------------------------------------------------------------------------------
/config/sync/system.maintenance.yml:
--------------------------------------------------------------------------------
1 | message: '@site is currently under maintenance. We should be back shortly. Thank you for your patience.'
2 | langcode: en
3 | _core:
4 | default_config_hash: Z5MXifrF77GEAgx0GQ6iWT8wStjFuY8BD9OruofWTJ8
5 |
--------------------------------------------------------------------------------
/config/sync/system.menu.account.yml:
--------------------------------------------------------------------------------
1 | uuid: 43f4789e-329c-4a56-b234-6711ca5ef0e1
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: M_Bh81osDyUQ4wV0GgU_NdBNqkzM87sLxjaCdFj9mnw
7 | id: account
8 | label: 'User account menu'
9 | description: 'Links related to the active user account'
10 | locked: true
11 |
--------------------------------------------------------------------------------
/config/sync/system.menu.admin.yml:
--------------------------------------------------------------------------------
1 | uuid: ef60d5ff-bd69-46c6-a087-8e7449034e32
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: sapEi2YDGoI9yQIT_WgIV2vUdQ6DScH0V3fAyTadAL0
7 | id: admin
8 | label: Administration
9 | description: 'Administrative task links'
10 | locked: true
11 |
--------------------------------------------------------------------------------
/config/sync/system.menu.footer.yml:
--------------------------------------------------------------------------------
1 | uuid: c204abbe-99fb-4d70-93f0-340e279a55ae
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: 7yrlW5z9zdg2eBucB2GPqXKSMQfH9lSRSO4DbWF7AFc
7 | id: footer
8 | label: Footer
9 | description: 'Site information links'
10 | locked: true
11 |
--------------------------------------------------------------------------------
/config/sync/system.menu.main.yml:
--------------------------------------------------------------------------------
1 | uuid: 62705467-f183-48bb-b04e-5a64ba3aa5e0
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: Q2Ra3jfoIVk0f3SjxJX61byRQFVBAbpzYDQOiY-kno8
7 | id: main
8 | label: 'Main navigation'
9 | description: 'Site section links'
10 | locked: true
11 |
--------------------------------------------------------------------------------
/config/sync/system.menu.tools.yml:
--------------------------------------------------------------------------------
1 | uuid: 33c6ab56-d403-4402-90dc-dd5e7d8320ba
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: BCM-vV1zzRaLHN18dqAR_CuGOj8AFJvTx7BKl_8Gcxc
7 | id: tools
8 | label: Tools
9 | description: 'User tool links, often added by modules'
10 | locked: true
11 |
--------------------------------------------------------------------------------
/config/sync/system.performance.yml:
--------------------------------------------------------------------------------
1 | cache:
2 | page:
3 | max_age: 0
4 | css:
5 | preprocess: true
6 | gzip: true
7 | fast_404:
8 | enabled: true
9 | paths: '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'
10 | exclude_paths: '/\/(?:styles|imagecache)\//'
11 | html: '
404 Not FoundNot Found
The requested URL "@path" was not found on this server.
'
12 | js:
13 | preprocess: true
14 | gzip: true
15 | stale_file_threshold: 2592000
16 | _core:
17 | default_config_hash: b2cssrj-lOmATIbdehfCqfCFgVR0qCdxxWhwqa2KBVQ
18 |
--------------------------------------------------------------------------------
/config/sync/system.rss.yml:
--------------------------------------------------------------------------------
1 | channel:
2 | description: ''
3 | items:
4 | limit: 10
5 | view_mode: rss
6 | langcode: en
7 | _core:
8 | default_config_hash: TlH7NNk46phfxu1mSUfwg1C0YqaGsUCeD4l9JQnQlDU
9 |
--------------------------------------------------------------------------------
/config/sync/system.site.yml:
--------------------------------------------------------------------------------
1 | uuid: alvar0hurtad0/drupal-vuejs-todo
2 | name: 'Drush Site-Install'
3 | mail: admin@example.com
4 | slogan: ''
5 | page:
6 | 403: ''
7 | 404: ''
8 | front: /user
9 | admin_compact_mode: false
10 | weight_select_max: 100
11 | langcode: en
12 | default_langcode: en
13 |
--------------------------------------------------------------------------------
/config/sync/system.theme.global.yml:
--------------------------------------------------------------------------------
1 | favicon:
2 | mimetype: image/vnd.microsoft.icon
3 | path: ''
4 | url: ''
5 | use_default: true
6 | features:
7 | comment_user_picture: true
8 | comment_user_verification: true
9 | favicon: true
10 | node_user_picture: false
11 | logo:
12 | path: ''
13 | url: ''
14 | use_default: true
15 | _core:
16 | default_config_hash: KHk8rzK2GMRtdfoAeocFrll8Q7gGtiocl2GF5jnX9cY
17 |
--------------------------------------------------------------------------------
/config/sync/system.theme.yml:
--------------------------------------------------------------------------------
1 | admin: '0'
2 | default: seven
3 | _core:
4 | default_config_hash: 6lQ55NXM9ysybMQ6NzJj4dtiQ1dAkOYxdDompa-r_kk
5 |
--------------------------------------------------------------------------------
/config/sync/text.settings.yml:
--------------------------------------------------------------------------------
1 | default_summary_length: 600
2 | _core:
3 | default_config_hash: Bkewb77RBOK3_aXMPsp8p87gbc03NvmC5gBLzPl7hVA
4 |
--------------------------------------------------------------------------------
/config/sync/update.settings.yml:
--------------------------------------------------------------------------------
1 | check:
2 | disabled_extensions: false
3 | interval_days: 1
4 | fetch:
5 | url: ''
6 | max_attempts: 2
7 | timeout: 30
8 | notification:
9 | emails:
10 | - admin@example.com
11 | threshold: all
12 | _core:
13 | default_config_hash: 2QzULf0zovJQx3J06Y9rufzzfi-CY2CTTlEfJJh2Qyw
14 |
--------------------------------------------------------------------------------
/config/sync/user.flood.yml:
--------------------------------------------------------------------------------
1 | uid_only: false
2 | ip_limit: 50
3 | ip_window: 3600
4 | user_limit: 5
5 | user_window: 21600
6 | _core:
7 | default_config_hash: UYfMzeP1S8jKm9PSvxf7nQNe8DsNS-3bc2WSNNXBQWs
8 |
--------------------------------------------------------------------------------
/config/sync/user.mail.yml:
--------------------------------------------------------------------------------
1 | cancel_confirm:
2 | body: "[user:display-name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team"
3 | subject: 'Account cancellation request for [user:display-name] at [site:name]'
4 | password_reset:
5 | body: "[user:display-name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team"
6 | subject: 'Replacement login information for [user:display-name] at [site:name]'
7 | register_admin_created:
8 | body: "[user:display-name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team"
9 | subject: 'An administrator created an account for you at [site:name]'
10 | register_no_approval_required:
11 | body: "[user:display-name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team"
12 | subject: 'Account details for [user:display-name] at [site:name]'
13 | register_pending_approval:
14 | body: "[user:display-name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team"
15 | subject: 'Account details for [user:display-name] at [site:name] (pending admin approval)'
16 | register_pending_approval_admin:
17 | body: "[user:display-name] has applied for an account.\n\n[user:edit-url]"
18 | subject: 'Account details for [user:display-name] at [site:name] (pending admin approval)'
19 | status_activated:
20 | body: "[user:display-name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:account-name]\npassword: Your password\n\n-- [site:name] team"
21 | subject: 'Account details for [user:display-name] at [site:name] (approved)'
22 | status_blocked:
23 | body: "[user:display-name],\n\nYour account on [site:name] has been blocked.\n\n-- [site:name] team"
24 | subject: 'Account details for [user:display-name] at [site:name] (blocked)'
25 | status_canceled:
26 | body: "[user:display-name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team"
27 | subject: 'Account details for [user:display-name] at [site:name] (canceled)'
28 | langcode: en
29 | _core:
30 | default_config_hash: m4J3ROov32OEquRYGLbx3SpdDGuqx9l_zJtNvihqdCg
31 |
--------------------------------------------------------------------------------
/config/sync/user.role.anonymous.yml:
--------------------------------------------------------------------------------
1 | uuid: 066d097e-4d72-4057-ad8e-22f7446fa1d8
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: j5zLMOdJBqC0bMvSdth5UebkprJB8g_2FXHqhfpJzow
7 | id: anonymous
8 | label: 'Anonymous user'
9 | weight: 0
10 | is_admin: false
11 | permissions:
12 | - 'access content'
13 | - 'restful delete dvt_todos_resource'
14 | - 'restful get dvt_todos_resource'
15 | - 'restful patch dvt_todos_resource'
16 | - 'restful post dvt_todos_resource'
17 |
--------------------------------------------------------------------------------
/config/sync/user.role.authenticated.yml:
--------------------------------------------------------------------------------
1 | uuid: 094dd292-4c65-4470-aba3-5a49552ff04a
2 | langcode: en
3 | status: true
4 | dependencies: { }
5 | _core:
6 | default_config_hash: dJ0L2DNSj5q6XVZAGsuVDpJTh5UeYkIPwKrUOOpr8YI
7 | id: authenticated
8 | label: 'Authenticated user'
9 | weight: 1
10 | is_admin: false
11 | permissions:
12 | - 'access content'
13 | - 'restful delete dvt_todos_resource'
14 | - 'restful get dvt_todos_resource'
15 | - 'restful patch dvt_todos_resource'
16 | - 'restful post dvt_todos_resource'
17 |
--------------------------------------------------------------------------------
/config/sync/user.settings.yml:
--------------------------------------------------------------------------------
1 | anonymous: Anonymous
2 | verify_mail: true
3 | notify:
4 | cancel_confirm: true
5 | password_reset: true
6 | status_activated: true
7 | status_blocked: false
8 | status_canceled: false
9 | register_admin_created: true
10 | register_no_approval_required: true
11 | register_pending_approval: true
12 | register: visitors_admin_approval
13 | cancel_method: user_cancel_block
14 | password_reset_timeout: 86400
15 | password_strength: true
16 | langcode: en
17 | _core:
18 | default_config_hash: w314Zp7B4NbrlV4KeeZLNSmTTpdJiv-KwZO2E1fSSK0
19 |
--------------------------------------------------------------------------------
/drush/README.md:
--------------------------------------------------------------------------------
1 | This directory contains commands, configuration and site aliases for Drush. See https://packagist.org/search/?type=drupal-drush for a directory of Drush commands installable via Composer.
2 |
--------------------------------------------------------------------------------
/drush/policy.drush.inc:
--------------------------------------------------------------------------------
1 | drupal vue todo
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
19 |
--------------------------------------------------------------------------------
/frontend/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome to Vuetify
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/frontend/nightwatch.json:
--------------------------------------------------------------------------------
1 | {
2 | "src_folders" : [
3 | "./tests/nightwatch/tests/"
4 | ],
5 | "output_folder" : "./tests/nightwatch/reports",
6 | "custom_commands_path" : "./tests/nightwatch/commands",
7 | "custom_assertions_path" : "./tests/nightwatch/assertions",
8 | "page_objects_path" : [
9 | "./tests/nightwatch/pages/"
10 | ],
11 | "globals_path" : "./tests/nightwatch/data/global.js",
12 | "test_settings" : {
13 | "default" : {
14 | "debugEnabled": false
15 | },
16 | "dev" : {
17 | "launch_url" : "http://127.0.0.1:8080",
18 | "selenium_port" : 9515,
19 | "selenium_host" : "127.0.0.1",
20 | "default_path_prefix" : "",
21 | "screenshots" : {
22 | "enabled" : true,
23 | "on_failure": true,
24 | "path" : "./tests/nightwatch/reports/screenshots/chrome"
25 | },
26 | "desiredCapabilities": {
27 | "browserName": "chrome",
28 | "chromeOptions": {
29 | "args": []
30 | }
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "frontend",
3 | "description": "drupal vue todo",
4 | "version": "1.0.0",
5 | "author": "alvar0hurtad0",
6 | "private": true,
7 | "scripts": {
8 | "dev": "cross-env NODE_ENV=development webpack-dev-server --open --inline --hot",
9 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
10 | },
11 | "dependencies": {
12 | "axios": "^0.18.0",
13 | "vue": "^2.5.3",
14 | "vue-router": "^3.0.1",
15 | "vuetify": "^1.0.0",
16 | "vuex": "^3.0.1"
17 | },
18 | "devDependencies": {
19 | "babel-core": "^6.26.0",
20 | "babel-loader": "^7.1.2",
21 | "babel-preset-env": "^1.6.0",
22 | "babel-preset-stage-2": "^6.24.1",
23 | "chromedriver": "^2.43.1",
24 | "cross-env": "^5.0.5",
25 | "css-loader": "^0.28.7",
26 | "file-loader": "^1.1.4",
27 | "nightwatch": "^0.9.21",
28 | "node-sass": "^4.5.3",
29 | "sass-loader": "^6.0.6",
30 | "style-loader": "^0.13.1",
31 | "stylus": "^0.54.5",
32 | "stylus-loader": "^3.0.1",
33 | "vue-loader": "^13.0.5",
34 | "vue-template-compiler": "^2.5.3",
35 | "webpack": "^3.6.0",
36 | "webpack-dev-server": "^2.9.1"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/frontend/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/frontend/public/favicon-32x32.png
--------------------------------------------------------------------------------
/frontend/public/v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/frontend/public/v.png
--------------------------------------------------------------------------------
/frontend/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | logout
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | drupal&vuejs rock!!!
18 |
19 |
20 |
21 |
22 |
47 |
--------------------------------------------------------------------------------
/frontend/src/api/axiosInterceptor.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | axios.interceptors.request.use(function(config) {
4 | const authToken = localStorage.getItem('auth_token');
5 | const csrfToken = localStorage.getItem('csrf_token');
6 | if(authToken && csrfToken) {
7 | config.headers.common = {
8 | "Authorization": `Basic ${authToken}`,
9 | "CSRF-Token": csrfToken,
10 | "Accept": "application/json, text/plain, */*",
11 | "Content-Type": "application/json"
12 | };
13 | }
14 | return config;
15 | }, function(err) {
16 | return Promise.reject(err);
17 | });
18 |
--------------------------------------------------------------------------------
/frontend/src/api/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import './axiosInterceptor';
3 |
4 | export default {
5 | getToken(payload) {
6 | let data =JSON.stringify({
7 | name: payload.username,
8 | pass: payload.password
9 | });
10 |
11 | let config = JSON.stringify({
12 | headers: {
13 | "Content-Type": "application/json"
14 | }
15 | });
16 |
17 | localStorage.clear();
18 |
19 | return axios.post(`${BASE_API_URL}/user/login?_format=json`,data, config)
20 | .then(res => {
21 | localStorage.setItem('loggedIn', true);
22 | localStorage.setItem('csrf_token', res.data.csrf_token);
23 | localStorage.setItem('username', payload.username);
24 | localStorage.setItem('auth_token', btoa(payload.username + ':' + payload.password));
25 | // @todo: This redirect should be done by vue-router.
26 | window.location.href = '/';
27 | Promise.resolve(res.data);
28 | })
29 | .catch(({ error }) => {
30 | localStorage.setItem('loggedIn', false);
31 | console.log('Issue with login');
32 | Promise.reject(error);
33 | })
34 | },
35 |
36 | addTodo(payload) {
37 | return axios.post(`${BASE_API_URL}/api/v1/todos?_format=json`, {title:payload.title, status: false})
38 | .then((response) => Promise.resolve(response.data))
39 | .catch((error) => Promise.reject(error));
40 | },
41 |
42 | editTodo({id, title, status}) {
43 | return axios.patch(`${BASE_API_URL}/api/v1/todos/${id}?_format=json`, {title: title, status: status})
44 | .then((response) => Promise.resolve(response.data))
45 | .catch((error) => Promise.reject(error));
46 | },
47 |
48 | removeTodo(id) {
49 | return axios.delete(`${BASE_API_URL}/api/v1/todos/${id}?_format=json`)
50 | .then((response) => Promise.resolve(response.data))
51 | .catch((error) => Promise.reject(error));
52 | },
53 |
54 | getTodos() {
55 | return axios.get(`${BASE_API_URL}/api/v1/todos/all?_format=json`)
56 | .then((response) => Promise.resolve(response.data))
57 | .catch((error) => Promise.reject(error));
58 | },
59 | }
60 |
--------------------------------------------------------------------------------
/frontend/src/components/LoginForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Login
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | LOGIN
35 |
36 |
37 |
38 |
39 |
40 |
41 |
79 |
--------------------------------------------------------------------------------
/frontend/src/components/TodoCounter.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{this.count}}
4 | pending
5 |
6 |
7 |
8 |
17 |
--------------------------------------------------------------------------------
/frontend/src/components/TodoForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | check
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/frontend/src/components/TodoList.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/frontend/src/components/TodoListItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | check_box
5 | check_box_outline_blank
6 |
7 |
8 |
9 |
10 |
11 | delete
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/frontend/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import Vuetify from 'vuetify'
4 | import 'vuetify/dist/vuetify.css'
5 |
6 | import router from '@/router';
7 | import routerInterceptor from '@/router/routerInterceptor';
8 |
9 | import store from './store/';
10 |
11 | Vue.use(Vuetify)
12 |
13 | new Vue({
14 | el: '#app',
15 | store,
16 | router,
17 | render: h => h(App)
18 | })
19 |
--------------------------------------------------------------------------------
/frontend/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import TodoList from '@/components/TodoList'
4 | import LoginForm from '@/components/LoginForm'
5 |
6 | Vue.use(Router);
7 |
8 | export default new Router({
9 | routes: [
10 | {
11 | path: '/login',
12 | name: 'Login',
13 | component: LoginForm
14 | },
15 | {
16 | path: '/logout',
17 | name: 'Logout',
18 | },
19 | {
20 | path: '/',
21 | name: 'List',
22 | component: TodoList,
23 | meta: {
24 | requiresAuth : true
25 | },
26 | },
27 | ]
28 | })
29 |
--------------------------------------------------------------------------------
/frontend/src/router/routerInterceptor.js:
--------------------------------------------------------------------------------
1 | import router from '.'
2 |
3 | router.beforeEach((to,from,next) => {
4 | // If visiting login view but you already have logged in redirect to home.
5 | if (to.name == 'Login' && window.localStorage.loggedIn) {
6 | return next({
7 | path: '/'
8 | })
9 | }
10 |
11 | // Remove session on logout.
12 | if (to.name == 'Logout') {
13 | delete window.localStorage.loggedIn;
14 | return next({
15 | path: '/login'
16 | })
17 | }
18 |
19 | // Redirect to login all request that need authentication if user is not logged.
20 | if(to.meta.requiresAuth && !(window.localStorage.loggedIn)){
21 | return next({
22 | path: '/login',
23 | query: {
24 | redirect: to.fullPath
25 | }
26 | })
27 | }
28 |
29 | return next()
30 | })
31 |
--------------------------------------------------------------------------------
/frontend/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex';
3 | import Todos from './modules/todos';
4 | import User from './modules/user';
5 |
6 | const actions = {};
7 | const getters = {};
8 | const mutations = {};
9 | const state = {};
10 |
11 | Vue.use(Vuex);
12 |
13 | export default new Vuex.Store({
14 | actions,
15 | getters,
16 | modules: {
17 | Todos,
18 | User
19 | },
20 | mutations,
21 | state
22 | });
23 |
--------------------------------------------------------------------------------
/frontend/src/store/modules/todos/TodosActions.js:
--------------------------------------------------------------------------------
1 | import {ADD_TODO, REMOVE_TODO, SET_TODOS, TOGGLE_TODO} from "./TodosMutations";
2 | import api from "@/api"
3 | export default {
4 | getTodos({commit}, payload) {
5 | api.getTodos()
6 | .then((response) => commit(SET_TODOS, response))
7 | .catch((error) => { console.log('Error: ', error) });
8 | },
9 | addTodo({commit}, payload) {
10 | api.addTodo(payload);
11 | commit(ADD_TODO, payload)
12 | },
13 | removeTodo({commit}, payload) {
14 | api.removeTodo(payload);
15 | commit(REMOVE_TODO, payload)
16 | },
17 | toggleTodo({commit}, payload) {
18 | api.editTodo(payload);
19 | commit(TOGGLE_TODO, payload)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/frontend/src/store/modules/todos/TodosMutations.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 |
3 | export const ADD_TODO = 'ADD_TODO';
4 | export const REMOVE_TODO = 'REMOVE_TODO';
5 | export const SET_TODOS = 'SET_TODOS';
6 | export const TOGGLE_TODO = 'TOGGLE_TODO;';
7 |
8 | export default {
9 | [ADD_TODO](state, { id, title }) {
10 | state.todos.push({ id, title, status: false })
11 | },
12 | [REMOVE_TODO](state, id) {
13 | var index = -1;
14 | for(var i = 0; i < state.todos.length; i++) {
15 | if(state.todos[i].id == id) {
16 | index = i;
17 | }
18 | }
19 |
20 | if (index != -1) {
21 | state.todos.splice(index, 1);
22 | }
23 | },
24 | [SET_TODOS](state, payload) {
25 | state.todos = [];
26 | Object.values(payload).forEach(function(todoNode) {
27 | state.todos.push({
28 | id: todoNode.nid[0].value,
29 | title: todoNode.title[0].value,
30 | status: todoNode.field_done[0].value
31 | })
32 | });
33 | },
34 | [TOGGLE_TODO](state, {id, title, status}) {
35 | state.todos.find(todo => todo.id === id).status = status;
36 | },
37 | }
38 |
--------------------------------------------------------------------------------
/frontend/src/store/modules/todos/index.js:
--------------------------------------------------------------------------------
1 | import actions from './TodosActions';
2 | import mutations from './TodosMutations';
3 |
4 | export default ({
5 | namespaced: true,
6 | state: {
7 | todos: [],
8 | },
9 | actions,
10 | mutations,
11 | });
12 |
--------------------------------------------------------------------------------
/frontend/src/store/modules/user/UserActions.js:
--------------------------------------------------------------------------------
1 | import {SET_LOGGED_IN, SET_NAME} from "./UserMutations";
2 | import api from "@/api"
3 |
4 | export default {
5 | getToken({commit},payload){
6 | api.getToken(payload)
7 | .then((response) => commit(SET_LOGGED_IN, true))
8 | .catch((error) => { console.log('Error: ', error) });
9 | },
10 | logOut({commit}) {
11 | localStorage.clear();
12 | commit(SET_LOGGED_IN, false);
13 | commit(SET_NAME, '');
14 | },
15 | checkUser({commit}) {
16 | if (localStorage.getItem('loggedIn')) {
17 | commit(SET_LOGGED_IN, true);
18 | commit(SET_NAME, localStorage.getItem('username'));
19 | }
20 | else {
21 | commit(SET_LOGGED_IN, false);
22 | commit(SET_NAME, '');
23 | }
24 | },
25 | }
26 |
--------------------------------------------------------------------------------
/frontend/src/store/modules/user/UserMutations.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 |
3 | export const SET_LOGGED_IN = 'SET_LOGGED_IN';
4 | export const SET_NAME = 'SET_NAME';
5 |
6 | export default {
7 | [SET_LOGGED_IN](state, isLogged) {
8 | state.isLoggedIn = isLogged;
9 | },
10 | [SET_NAME](state, name) {
11 | state.userName = name;
12 | },
13 | }
14 |
--------------------------------------------------------------------------------
/frontend/src/store/modules/user/index.js:
--------------------------------------------------------------------------------
1 | import actions from './UserActions';
2 | import mutations from './UserMutations';
3 |
4 | export default ({
5 | state: {
6 | isLoggedIn: false,
7 | userName: ''
8 | },
9 | actions,
10 | mutations,
11 | });
12 |
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/assertions/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/frontend/tests/nightwatch/assertions/.gitkeep
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/commands/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/frontend/tests/nightwatch/commands/.gitkeep
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/frontend/tests/nightwatch/data/.gitkeep
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/data/global.js:
--------------------------------------------------------------------------------
1 | var chromedriver = require('chromedriver');
2 |
3 | module.exports = {
4 | "dev": {
5 | before : function(done) {
6 | chromedriver.start();
7 | done();
8 | },
9 |
10 | after : function(done) {
11 | chromedriver.stop();
12 | done();
13 | },
14 | },
15 |
16 | };
17 |
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/pages/login.js:
--------------------------------------------------------------------------------
1 | /*const userLogin = {
2 |
3 | command: function (username) {
4 | return this
5 | .clearValue('@userName')
6 | .setValue('@userName', username)
7 | .clearValue('@userPassword')
8 | .setValue('@userPassword', username)
9 | .click('@loginFormSubmit');
10 | },
11 | };
12 | */
13 | const loginCommands = {
14 | loginAsUser(username) {
15 | this.waitForElementVisible('@loginFormSubmit', 5000)
16 | .clearValue('@userName')
17 | .setValue('@userName', username)
18 | .clearValue('@userPassword')
19 | .setValue('@userPassword', username)
20 | .click('@loginFormSubmit')
21 | .api.pause(1000);
22 |
23 | return this;
24 | }
25 | };
26 |
27 | module.exports = {
28 | url: function () {
29 | return this.api.launchUrl;
30 | },
31 |
32 | commands: [loginCommands],
33 | elements: {
34 | loginForm: {
35 | selector: '#login-form'
36 | },
37 | userName: {
38 | selector: '#login-form input[aria-label=username]'
39 | },
40 | userPassword: {
41 | selector: '#login-form input[aria-label=Password]'
42 | },
43 | loginFormSubmit: {
44 | selector: '#login-form button[value=submit]'
45 | },
46 | }
47 | };
48 |
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/pages/singlePage.js:
--------------------------------------------------------------------------------
1 | /*const userLogin = {
2 |
3 | command: function (username) {
4 | return this
5 | .clearValue('@userName')
6 | .setValue('@userName', username)
7 | .clearValue('@userPassword')
8 | .setValue('@userPassword', username)
9 | .click('@loginFormSubmit');
10 | },
11 | };
12 | */
13 | const singlePageCommands = {
14 | addTodo(todo) {
15 | this.waitForElementVisible('@todoForm', 5000)
16 | .clearValue('@todoFormName')
17 | .setValue('@todoFormName', todo)
18 | .click('@todoFormSubmit')
19 | .api.pause(1000);
20 |
21 | return this;
22 | }
23 | };
24 |
25 | module.exports = {
26 | url: function () {
27 | return this.api.launchUrl;
28 | },
29 |
30 | commands: [singlePageCommands],
31 | elements: {
32 | todoForm: {
33 | selector: '#todo-form'
34 | },
35 | todoFormName: {
36 | selector: '#todo-form input[type=text]'
37 | },
38 | todoFormSubmit: {
39 | selector: '#todo-form button'
40 | },
41 | pendingCounter: {
42 | selector: '.v-toolbar .v-chip__content .v-avatar'
43 | },
44 | }
45 | };
46 |
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/tests/login.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '@tags': [],
3 | '@disabled': false,
4 | 'Test Login' : function (client) {
5 | client.init();
6 |
7 | var login_page = client.page.login();
8 |
9 | login_page
10 | .navigate()
11 | .assert.containsText('@loginForm', 'Login');
12 |
13 | login_page
14 | .navigate()
15 | .loginAsUser('user1')
16 | .waitForElementVisible('#logout-link', 3000);
17 |
18 | client.end();
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/frontend/tests/nightwatch/tests/pending.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '@tags': [],
3 | '@disabled': false,
4 | 'Test Login' : function (client) {
5 | client.init();
6 |
7 | var login_page = client.page.login();
8 | var single_page = client.page.singlePage();
9 |
10 | login_page
11 | .navigate()
12 | .loginAsUser('user1');
13 |
14 | single_page
15 | .waitForElementVisible('@pendingCounter', 3000)
16 | .expect.element('@pendingCounter').text.to.contain('2').before(1000);
17 |
18 | single_page.click('#logout-link');
19 |
20 | login_page
21 | .navigate()
22 | .loginAsUser('user2');
23 |
24 | single_page
25 | .waitForElementVisible('@pendingCounter', 3000)
26 | .expect.element('@pendingCounter').text.to.contain('1').before(1000);
27 |
28 | client.end();
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/frontend/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var webpack = require('webpack')
3 |
4 | module.exports = {
5 | entry: './src/main.js',
6 | output: {
7 | path: path.resolve(__dirname, './dist'),
8 | publicPath: '/dist/',
9 | filename: 'build.js'
10 | },
11 | resolve: {
12 | extensions: ['.js', '.vue'],
13 | alias: {
14 | 'vue$': 'vue/dist/vue.esm.js',
15 | 'public': path.resolve(__dirname, './public'),
16 | '@': path.resolve('src'),
17 | }
18 | },
19 | module: {
20 | rules: [
21 | {
22 | test: /\.vue$/,
23 | loader: 'vue-loader',
24 | options: {
25 | loaders: {
26 | // Since sass-loader (weirdly) has SCSS as its default parse mode, we map
27 | // the "scss" and "sass" values for the lang attribute to the right configs here.
28 | // other preprocessors should work out of the box, no loader config like this necessary.
29 | 'scss': 'vue-style-loader!css-loader!sass-loader',
30 | 'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax'
31 | }
32 | // other vue-loader options go here
33 | }
34 | },
35 | {
36 | test: /\.js$/,
37 | loader: 'babel-loader',
38 | exclude: /node_modules/
39 | },
40 | {
41 | test: /\.(png|jpg|gif|svg)$/,
42 | loader: 'file-loader',
43 | options: {
44 | objectAssign: 'Object.assign'
45 | }
46 | },
47 | {
48 | test: /\.css$/,
49 | loader: ['style-loader', 'css-loader']
50 | },
51 | {
52 | test: /\.styl$/,
53 | loader: ['style-loader', 'css-loader', 'stylus-loader']
54 | }
55 | ]
56 | },
57 | devServer: {
58 | historyApiFallback: true,
59 | noInfo: true
60 | },
61 | performance: {
62 | hints: false
63 | },
64 | devtool: '#eval-source-map'
65 | }
66 |
67 | if (process.env.NODE_ENV === 'production') {
68 | module.exports.devtool = '#source-map'
69 | // http://vue-loader.vuejs.org/en/workflow/production.html
70 | module.exports.plugins = (module.exports.plugins || []).concat([
71 | new webpack.DefinePlugin({
72 | 'process.env': {
73 | NODE_ENV: '"production"'
74 | }
75 | }),
76 | new webpack.optimize.UglifyJsPlugin({
77 | sourceMap: true,
78 | compress: {
79 | warnings: false
80 | }
81 | }),
82 | new webpack.LoaderOptionsPlugin({
83 | minimize: true
84 | })
85 | ])
86 | }
87 |
88 | if (process.env.NODE_ENV === 'development') {
89 | module.exports.plugins = (module.exports.plugins || []).concat([
90 | new webpack.DefinePlugin({
91 | BASE_API_URL: JSON.stringify("http://drupal-vuejs-todo.localhost"),
92 | })
93 | ])
94 | }
95 |
--------------------------------------------------------------------------------
/phpcs-ruleset.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Drupal coding standard
6 |
7 |
8 | *.gif
9 | *.less
10 | *.png
11 |
12 |
13 | *.min.css
14 | *.min.js
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ./core/includes
41 | ./core/lib
42 | ./core/modules
43 | ./modules
44 | ./sites
45 |
46 |
47 | ./
48 | ./
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/scripts/composer/ScriptHandler.php:
--------------------------------------------------------------------------------
1 | locateRoot(getcwd());
22 | $drupalRoot = $drupalFinder->getDrupalRoot();
23 |
24 | $dirs = [
25 | 'modules',
26 | 'profiles',
27 | 'themes',
28 | ];
29 |
30 | // Required for unit testing
31 | foreach ($dirs as $dir) {
32 | if (!$fs->exists($drupalRoot . '/'. $dir)) {
33 | $fs->mkdir($drupalRoot . '/'. $dir);
34 | $fs->touch($drupalRoot . '/'. $dir . '/.gitkeep');
35 | }
36 | }
37 |
38 | // Prepare the settings file for installation
39 | if (!$fs->exists($drupalRoot . '/sites/default/settings.php') and $fs->exists($drupalRoot . '/sites/default/default.settings.php')) {
40 | $fs->copy($drupalRoot . '/sites/default/default.settings.php', $drupalRoot . '/sites/default/settings.php');
41 | require_once $drupalRoot . '/core/includes/bootstrap.inc';
42 | require_once $drupalRoot . '/core/includes/install.inc';
43 | $settings['config_directories'] = [
44 | CONFIG_SYNC_DIRECTORY => (object) [
45 | 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
46 | 'required' => TRUE,
47 | ],
48 | ];
49 | drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php');
50 | $fs->chmod($drupalRoot . '/sites/default/settings.php', 0640);
51 | $event->getIO()->write("Create a sites/default/settings.php file with chmod 0640");
52 | }
53 |
54 | // Create the files directory with chmod 0755
55 | if (!$fs->exists($drupalRoot . '/sites/default/files')) {
56 | $oldmask = umask(0);
57 | $fs->mkdir($drupalRoot . '/sites/default/files', 0755);
58 | umask($oldmask);
59 | $event->getIO()->write("Create a sites/default/files directory with chmod 0755");
60 | }
61 | }
62 |
63 | /**
64 | * Checks if the installed version of Composer is compatible.
65 | *
66 | * Composer 1.0.0 and higher consider a `composer install` without having a
67 | * lock file present as equal to `composer update`. We do not ship with a lock
68 | * file to avoid merge conflicts downstream, meaning that if a project is
69 | * installed with an older version of Composer the scaffolding of Drupal will
70 | * not be triggered. We check this here instead of in drupal-scaffold to be
71 | * able to give immediate feedback to the end user, rather than failing the
72 | * installation after going through the lengthy process of compiling and
73 | * downloading the Composer dependencies.
74 | *
75 | * @see https://github.com/composer/composer/pull/5035
76 | */
77 | public static function checkComposerVersion(Event $event) {
78 | $composer = $event->getComposer();
79 | $io = $event->getIO();
80 |
81 | $version = $composer::VERSION;
82 |
83 | // The dev-channel of composer uses the git revision as version number,
84 | // try to the branch alias instead.
85 | if (preg_match('/^[0-9a-f]{40}$/i', $version)) {
86 | $version = $composer::BRANCH_ALIAS_VERSION;
87 | }
88 |
89 | // If Composer is installed through git we have no easy way to determine if
90 | // it is new enough, just display a warning.
91 | if ($version === '@package_version@' || $version === '@package_branch_alias_version@') {
92 | $io->writeError('You are running a development version of Composer. If you experience problems, please update Composer to the latest stable version.');
93 | }
94 | elseif (Comparator::lessThan($version, '1.0.0')) {
95 | $io->writeError('Drupal-project requires Composer version 1.0.0 or higher. Please update your Composer before continuing.');
96 | exit(1);
97 | }
98 | }
99 |
100 | }
101 |
--------------------------------------------------------------------------------
/scripts/travis-ci/run-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | case "$1" in
4 | PHP_CodeSniffer)
5 | cd $TRAVIS_BUILD_DIR
6 | ./vendor/bin/phpcs
7 | exit $?
8 | ;;
9 | PHPUnit)
10 | cd $TRAVIS_BUILD_DIR/web
11 | ../vendor/bin/phpunit
12 | exit $?
13 | ;;
14 | Behat)
15 | cd $TRAVIS_BUILD_DIR/tests
16 | ./behat
17 | exit $?
18 | ;;
19 | *)
20 | echo "Unknown test '$1'"
21 | exit 1
22 | esac
23 |
--------------------------------------------------------------------------------
/scripts/workflow/default-content.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Exit immediately on errors, and echo commands as they are executed.
4 | set -ex
5 |
6 | echo "Get composer dependencies."
7 | composer install
8 |
9 | echo "Import default content."
10 | cd web
11 | drush en dvt_default_content -y
12 | drush cim -y --partial --source=modules/custom/dvt_default_content/config/optional/
13 | drush mim --group=default_content --update
14 | drush pm-uninstall migrate -y
15 |
16 | echo "Clearing cache."
17 | drush cr
18 |
--------------------------------------------------------------------------------
/scripts/workflow/project-install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Exit immediately on errors, and echo commands as they are executed.
4 | set -ex
5 |
6 | echo "Get composer dependencies."
7 | composer install
8 |
9 | echo "Installing project..."
10 | cd web
11 | # Using ../vendor/bin/drush to ensure this script works out of the box.
12 | ../vendor/bin/drush site-install minimal --config-dir=../config/sync --account-name=admin --account-pass=admin -y
13 |
14 | echo "Importing default content."
15 | ../vendor/bin/drush en dvt_default_content -y
16 | ../vendor/bin/drush cim -y --partial --source=modules/custom/dvt_default_content/config/optional/
17 | ../vendor/bin/drush mim --group=default_content --update
18 | ../vendor/bin/drush pm-uninstall migrate -y
19 |
20 | echo "Clearing cache."
21 | ../vendor/bin/drush cr
22 |
--------------------------------------------------------------------------------
/src/Phing/PhpCodeSnifferConfigurationTask.php:
--------------------------------------------------------------------------------
1 | checkRequirements();
86 |
87 | $document = new \DOMDocument('1.0', 'UTF-8');
88 | $document->formatOutput = TRUE;
89 |
90 | // Create the root 'ruleset' element.
91 | $root_element = $document->createElement('ruleset');
92 | $root_element->setAttribute('name', 'pbm_default');
93 | $document->appendChild($root_element);
94 |
95 | // Add the description.
96 | $element = $document->createElement('description', 'Default PHP CodeSniffer configuration for composer based Drupal projects.');
97 | $root_element->appendChild($element);
98 |
99 | // Add the coding standard.
100 | $element = $document->createElement('rule');
101 | $element->setAttribute('ref', $this->standard);
102 | $root_element->appendChild($element);
103 |
104 | // Add the files to check.
105 | foreach ($this->files as $file) {
106 | $element = $document->createElement('file', $file);
107 | $root_element->appendChild($element);
108 | }
109 |
110 | // Add file extensions.
111 | if (!empty($this->extensions)) {
112 | $extensions = implode(',', $this->extensions);
113 | $this->appendArgument($document, $root_element, $extensions, 'extensions');
114 | }
115 |
116 | // Add ignore patterns.
117 | foreach ($this->ignorePatterns as $pattern) {
118 | $element = $document->createElement('exclude-pattern', $pattern);
119 | $root_element->appendChild($element);
120 | }
121 |
122 | // Add the report type.
123 | if (!empty($this->report)) {
124 | $this->appendArgument($document, $root_element, $this->report, 'report');
125 | }
126 |
127 | // Add the shorthand options.
128 | $shorthand_options = array(
129 | 'p' => 'showProgress',
130 | 's' => 'showSniffCodes',
131 | );
132 |
133 | $options = array_filter($shorthand_options, function ($value) {
134 | return $this->$value;
135 | });
136 |
137 | if (!empty($options)) {
138 | $this->appendArgument($document, $root_element, implode('', array_flip($options)));
139 | }
140 |
141 | // Save the file.
142 | file_put_contents($this->configFile, $document->saveXML());
143 |
144 | // If a global configuration file is passed, update this too.
145 | if (!empty($this->globalConfig)) {
146 | $global_config = << '$this->configFile',
150 | );
151 | PHP;
152 | file_put_contents($this->globalConfig, $global_config);
153 | }
154 | }
155 |
156 | /**
157 | * Appends an argument element to the XML document.
158 | *
159 | * This will append an XML element in the following format:
160 | *
161 | *
162 | * @param \DOMDocument $document
163 | * The document that will contain the argument to append.
164 | * @param \DOMElement $element
165 | * The parent element of the argument to append.
166 | * @param string $value
167 | * The argument value.
168 | * @param string $name
169 | * Optional argument name.
170 | */
171 | protected function appendArgument(\DOMDocument $document, \DOMElement $element, $value, $name = '') {
172 | $argument = $document->createElement('arg');
173 | if (!empty($name)) {
174 | $argument->setAttribute('name', $name);
175 | }
176 | $argument->setAttribute('value', $value);
177 | $element->appendChild($argument);
178 | }
179 |
180 | /**
181 | * Checks if all properties required for generating the config are present.
182 | *
183 | * @throws \BuildException
184 | * Thrown when a required property is not present.
185 | */
186 | protected function checkRequirements() {
187 | $required_properties = array('configFile', 'files', 'standard');
188 | foreach ($required_properties as $required_property) {
189 | if (empty($this->$required_property)) {
190 | throw new \BuildException("Missing required property '$required_property'.");
191 | }
192 | }
193 | }
194 |
195 | /**
196 | * Sets the path to the configuration file to generate.
197 | *
198 | * @param string $configFile
199 | * The path to the configuration file to generate.
200 | */
201 | public function setConfigFile($configFile) {
202 | $this->configFile = $configFile;
203 | }
204 |
205 | /**
206 | * Sets the file extensions to scan.
207 | *
208 | * @param string $extensions
209 | * A string containing file extensions, delimited by spaces, commas or
210 | * semicolons.
211 | */
212 | public function setExtensions($extensions) {
213 | $this->extensions = array();
214 | $token = ' ,;';
215 | $extension = strtok($extensions, $token);
216 | while ($extension !== false) {
217 | $this->extensions[] = $extension;
218 | $extension = strtok($token);
219 | }
220 | }
221 |
222 | /**
223 | * Sets the list of files and folders to scan.
224 | *
225 | * @param string $files
226 | * A list of paths, delimited by spaces, commas or semicolons.
227 | */
228 | public function setFiles($files) {
229 | $this->files = array();
230 | $token = ' ,;';
231 | $file = strtok($files, $token);
232 | while ($file !== false) {
233 | $this->files[] = $file;
234 | $file = strtok($token);
235 | }
236 | }
237 |
238 | /**
239 | * Sets the path to the global configuration file to generate.
240 | *
241 | * @param string $globalConfig
242 | * The path to the global configuration file to generate.
243 | */
244 | public function setGlobalConfig($globalConfig) {
245 | $this->globalConfig = $globalConfig;
246 | }
247 |
248 | /**
249 | * Sets the list of patterns to ignore.
250 | *
251 | * @param string $ignorePatterns
252 | * The list of patterns, delimited by spaces, commas or semicolons.
253 | */
254 | public function setIgnorePatterns($ignorePatterns) {
255 | $this->ignorePatterns = array();
256 | $token = ' ,;';
257 | $pattern = strtok($ignorePatterns, $token);
258 | while ($pattern !== false) {
259 | $this->ignorePatterns[] = $pattern;
260 | $pattern = strtok($token);
261 | }
262 | }
263 |
264 | /**
265 | * Sets the report format to use.
266 | *
267 | * @param string $report
268 | * The report format to use.
269 | */
270 | public function setReport($report) {
271 | $this->report = $report;
272 | }
273 |
274 | /**
275 | * Sets whether or not to show progress.
276 | *
277 | * @param bool $showProgress
278 | * Whether or not to show progress.
279 | */
280 | public function setShowProgress($showProgress) {
281 | $this->showProgress = (bool) $showProgress;
282 | }
283 |
284 | /**
285 | * Sets whether or not to show sniff codes in the report.
286 | *
287 | * @param bool $showSniffCodes
288 | * Whether or not to show sniff codes.
289 | */
290 | public function setShowSniffCodes($showSniffCodes) {
291 | $this->showSniffCodes = (bool) $showSniffCodes;
292 | }
293 |
294 | /**
295 | * Sets the coding standard to use.
296 | *
297 | * @param string $standard
298 | * The coding standard to use.
299 | */
300 | public function setStandard($standard) {
301 | $this->standard = $standard;
302 | }
303 |
304 | }
305 |
--------------------------------------------------------------------------------
/src/Phing/PhpUnitConfigurationTask.php:
--------------------------------------------------------------------------------
1 | checkRequirements();
86 |
87 | // Load the template file.
88 | $document = new \DOMDocument('1.0', 'UTF-8');
89 | $document->preserveWhiteSpace = FALSE;
90 | $document->formatOutput = TRUE;
91 | $document->load($this->distFile);
92 |
93 | // Set the base URL.
94 | $this->setEnvironmentVariable('SIMPLETEST_BASE_URL', $this->baseUrl, $document);
95 |
96 | // Set the database URL.
97 | $this->setEnvironmentVariable('SIMPLETEST_DB', $this->dbUrl, $document);
98 |
99 | // Set the path to the browsertest output directory.
100 | $this->setEnvironmentVariable('BROWSERTEST_OUTPUT_DIRECTORY', $this->browsertestOutputDirectory, $document);
101 |
102 | // Set the path to the browsertest output file.
103 | $this->setEnvironmentVariable('BROWSERTEST_OUTPUT_FILE', $this->browsertestOutputFile, $document);
104 |
105 | // Add a test suite for the Drupal project.
106 | $test_suite = $document->createElement('testsuite');
107 | $test_suite->setAttribute('name', $this->testsuiteName);
108 |
109 | // Append the list of test files.
110 | foreach ($this->files as $file) {
111 | $element = $document->createElement('file', $file);
112 | $test_suite->appendChild($element);
113 | }
114 |
115 | // Append the list of test directories.
116 | foreach ($this->directories as $directory) {
117 | $element = $document->createElement('directory', $directory);
118 | $test_suite->appendChild($element);
119 | }
120 |
121 | // Insert the test suite in the list of test suites.
122 | $test_suites = $document->getElementsByTagName('testsuites')->item(0);
123 | $test_suites->appendChild($test_suite);
124 |
125 | // Save the file.
126 | file_put_contents($this->configFile, $document->saveXML());
127 | }
128 |
129 | /**
130 | * Sets the value of a pre-existing environment variable.
131 | *
132 | * @param string $variableName
133 | * The name of the environment variable for which to set the value.
134 | * @param string $value
135 | * The value to set.
136 | * @param \DOMDocument $document
137 | * The document in which the change should take place.
138 | */
139 | protected function setEnvironmentVariable($variableName, $value, \DOMDocument $document) {
140 | /** @var \DOMElement $element */
141 | foreach ($document->getElementsByTagName('env') as $element) {
142 | if ($element->getAttribute('name') === $variableName) {
143 | $element->setAttribute('value', $value);
144 | break;
145 | }
146 | }
147 | }
148 | /**
149 | * Checks if all properties required for generating the config are present.
150 | *
151 | * @throws \BuildException
152 | * Thrown when a required property is not present.
153 | */
154 | protected function checkRequirements() {
155 | $required_properties = ['configFile', 'distFile'];
156 | foreach ($required_properties as $required_property) {
157 | if (empty($this->$required_property)) {
158 | throw new \BuildException("Missing required property '$required_property'.");
159 | }
160 | }
161 | }
162 |
163 | /**
164 | * Sets the path to the template of the configuration file.
165 | *
166 | * @param string $distFile
167 | * The path to the template of the configuration file.
168 | */
169 | public function setDistFile($distFile) {
170 | $this->distFile = $distFile;
171 | }
172 |
173 | /**
174 | * Sets the path to the configuration file to generate.
175 | *
176 | * @param string $configFile
177 | * The path to the configuration file to generate.
178 | */
179 | public function setConfigFile($configFile) {
180 | $this->configFile = $configFile;
181 | }
182 |
183 | /**
184 | * Sets the list of directories containing test files to execute.
185 | *
186 | * @param string $directories
187 | * A list of directory paths, delimited by spaces, commas or semicolons.
188 | */
189 | public function setDirectories($directories) {
190 | $this->directories = [];
191 | $token = ' ,;';
192 | $directory = strtok($directories, $token);
193 | while ($directory !== FALSE) {
194 | $this->directories[] = $directory;
195 | $directory = strtok($token);
196 | }
197 | }
198 |
199 | /**
200 | * Sets the list of test files to execute.
201 | *
202 | * @param string $files
203 | * A list of file paths, delimited by spaces, commas or semicolons.
204 | */
205 | public function setFiles($files) {
206 | $this->files = [];
207 | $token = ' ,;';
208 | $file = strtok($files, $token);
209 | while ($file !== FALSE) {
210 | $this->files[] = $file;
211 | $file = strtok($token);
212 | }
213 | }
214 |
215 | /**
216 | * Sets the name of the test suite.
217 | *
218 | * @param string $testsuiteName
219 | * The name of the test suite.
220 | */
221 | public function setTestsuiteName($testsuiteName) {
222 | $this->testsuiteName = $testsuiteName;
223 | }
224 |
225 | /**
226 | * Sets the base URL.
227 | *
228 | * @param string $baseUrl
229 | * The base URL.
230 | */
231 | public function setBaseUrl($baseUrl) {
232 | $this->baseUrl = $baseUrl;
233 | }
234 |
235 | /**
236 | * Sets the database URL.
237 | *
238 | * @param string $dbUrl
239 | * The database URL.
240 | */
241 | public function setDbUrl($dbUrl) {
242 | $this->dbUrl = $dbUrl;
243 | }
244 |
245 | /**
246 | * Sets the path to the browsertest output directory.
247 | *
248 | * @param string $browsertestOutputDirectory
249 | * The path to the directory.
250 | */
251 | public function setBrowsertestOutputDirectory($browsertestOutputDirectory) {
252 | $this->browsertestOutputDirectory = $browsertestOutputDirectory;
253 | }
254 |
255 | /**
256 | * Sets the path to the browsertest output file.
257 | *
258 | * @param string $browsertestOutputFile
259 | * The path to the file.
260 | */
261 | public function setBrowsertestOutputFile($browsertestOutputFile) {
262 | $this->browsertestOutputFile = $browsertestOutputFile;
263 | }
264 |
265 | }
266 |
--------------------------------------------------------------------------------
/tests/behat:
--------------------------------------------------------------------------------
1 | ../vendor/bin/behat
--------------------------------------------------------------------------------
/tests/behat.yml.dist:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | default:
4 | contexts:
5 | - FeatureContext
6 | - Drupal\DrupalExtension\Context\DrupalContext
7 | - Drupal\DrupalExtension\Context\DrushContext
8 | - Drupal\DrupalExtension\Context\MessageContext
9 | - Drupal\DrupalExtension\Context\MinkContext
10 | filters:
11 | tags: '~@wip'
12 | extensions:
13 | Behat\MinkExtension:
14 | base-url: '${behat.base_url}'
15 | files_path: '${behat.files.path}'
16 | goutte: ~
17 | javascript_session: 'selenium2'
18 | browser_name: '${behat.browser_name}'
19 | selenium2:
20 | wd_host: '${behat.webdriver_url}'
21 | Drupal\DrupalExtension:
22 | api_driver: 'drupal'
23 | blackbox: ~
24 | drupal:
25 | drupal_root: '${website.drupal.dir}'
26 | selectors:
27 | message_selector: '.messages'
28 | error_message_selector: '.messages.messages--error'
29 | success_message_selector: '.messages.messages--status'
30 | subcontexts:
31 | paths:
32 | - '${behat.subcontexts.path}'
33 | formatters:
34 | ${behat.formatter.name}: ~
35 |
--------------------------------------------------------------------------------
/tests/features/authentication.feature:
--------------------------------------------------------------------------------
1 | Feature: User authentication
2 | In order to protect the integrity of the website
3 | As a product owner
4 | I want to make sure only authenticated users can access the site administration
5 |
6 | Scenario: Anonymous user can see the user login page
7 | Given I am not logged in
8 | When I visit "user"
9 | Then I should see the text "Log in"
10 | And I should see the text "Reset your password"
11 | And I should see the text "Username"
12 | And I should see the text "Password"
13 | But I should not see the text "Log out"
14 | And I should not see the text "My account"
15 |
16 | Scenario Outline: Anonymous user cannot access site administration
17 | Given I am not logged in
18 | When I go to ""
19 | Then I should get an access denied error
20 |
21 | Examples:
22 | | path |
23 | | admin |
24 | | admin/config |
25 | | admin/content |
26 | | admin/people |
27 | | admin/structure |
28 | | node/add |
29 | | node/add/page |
30 |
--------------------------------------------------------------------------------
/tests/features/bootstrap/FeatureContext.php:
--------------------------------------------------------------------------------
1 | assertSession()->statusCodeEquals(403);
23 | }
24 |
25 | /**
26 | * Checks that a given image is present in the page.
27 | *
28 | * @Then I (should )see the image :filename
29 | */
30 | public function assertImagePresent($filename) {
31 | // Drupal appends an underscore and a number to the filename when duplicate
32 | // files are uploaded, for example when a test is run more than once.
33 | // We split up the filename and extension and match for both.
34 | $parts = pathinfo($filename);
35 | $extension = $parts['extension'];
36 | $filename = $parts['filename'];
37 | $this->assertSession()->elementExists('css', "img[src$='.$extension'][src*='$filename']");
38 | }
39 |
40 | /**
41 | * Checks that a given image is not present in the page.
42 | *
43 | * @Then I should not see the image :filename
44 | */
45 | public function assertImageNotPresent($filename) {
46 | // Drupal appends an underscore and a number to the filename when duplicate
47 | // files are uploaded, for example when a test is run more than once.
48 | // We split up the filename and extension and match for both.
49 | $parts = pathinfo($filename);
50 | $extension = $parts['extension'];
51 | $filename = $parts['filename'];
52 | $this->assertSession()->elementNotExists('css', "img[src$='.$extension'][src*='$filename']");
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/web/.csslintrc:
--------------------------------------------------------------------------------
1 | --errors=box-model,
2 | display-property-grouping,
3 | duplicate-background-images,
4 | duplicate-properties,
5 | empty-rules,
6 | ids,
7 | import,
8 | important,
9 | known-properties,
10 | outline-none,
11 | overqualified-elements,
12 | qualified-headings,
13 | shorthand,
14 | star-property-hack,
15 | text-indent,
16 | underscore-property-hack,
17 | unique-headings,
18 | unqualified-attributes,
19 | vendor-prefix,
20 | zero-units
21 | --ignore=adjoining-classes,
22 | box-sizing,
23 | bulletproof-font-face,
24 | compatible-vendor-prefixes,
25 | errors,
26 | fallback-colors,
27 | floats,
28 | font-faces,
29 | font-sizes,
30 | gradients,
31 | import-ie-limit,
32 | order-alphabetical,
33 | regex-selectors,
34 | rules-count,
35 | selector-max,
36 | selector-max-approaching,
37 | selector-newline,
38 | universal-selector
39 | --exclude-list=core/assets,
40 | vendor
41 |
--------------------------------------------------------------------------------
/web/.editorconfig:
--------------------------------------------------------------------------------
1 | # Drupal editor configuration normalization
2 | # @see http://editorconfig.org/
3 |
4 | # This is the top-most .editorconfig file; do not search in parent directories.
5 | root = true
6 |
7 | # All files.
8 | [*]
9 | end_of_line = LF
10 | indent_style = space
11 | indent_size = 2
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 | insert_final_newline = true
15 |
16 | [composer.{json,lock}]
17 | indent_size = 4
18 |
--------------------------------------------------------------------------------
/web/.eslintignore:
--------------------------------------------------------------------------------
1 | core/**/*
2 | vendor/**/*
3 | sites/**/files/**/*
4 | libraries/**/*
5 | sites/**/libraries/**/*
6 | profiles/**/libraries/**/*
7 | **/js_test_files/**/*
8 | **/node_modules/**/*
9 |
--------------------------------------------------------------------------------
/web/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./core/.eslintrc.json"
3 | }
4 |
--------------------------------------------------------------------------------
/web/.gitattributes:
--------------------------------------------------------------------------------
1 | # Drupal git normalization
2 | # @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3 | # @see https://www.drupal.org/node/1542048
4 |
5 | # Normally these settings would be done with macro attributes for improved
6 | # readability and easier maintenance. However macros can only be defined at the
7 | # repository root directory. Drupal avoids making any assumptions about where it
8 | # is installed.
9 |
10 | # Define text file attributes.
11 | # - Treat them as text.
12 | # - Ensure no CRLF line-endings, neither on checkout nor on checkin.
13 | # - Detect whitespace errors.
14 | # - Exposed by default in `git diff --color` on the CLI.
15 | # - Validate with `git diff --check`.
16 | # - Deny applying with `git apply --whitespace=error-all`.
17 | # - Fix automatically with `git apply --whitespace=fix`.
18 |
19 | *.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
20 | *.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
21 | *.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
22 | *.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
23 | *.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
24 | *.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
25 | *.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
26 | *.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
27 | *.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
28 | *.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
29 | *.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
30 | *.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
31 | *.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
32 | *.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
33 | *.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
34 | *.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
35 | *.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
36 | *.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
37 | *.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
38 | *.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
39 | *.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
40 | *.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
41 | *.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
42 | *.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
43 | *.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
44 |
45 | # Define binary file attributes.
46 | # - Do not treat them as text.
47 | # - Include binary diff in patches instead of "binary files differ."
48 | *.eot -text diff
49 | *.exe -text diff
50 | *.gif -text diff
51 | *.gz -text diff
52 | *.ico -text diff
53 | *.jpeg -text diff
54 | *.jpg -text diff
55 | *.otf -text diff
56 | *.phar -text diff
57 | *.png -text diff
58 | *.svgz -text diff
59 | *.ttf -text diff
60 | *.woff -text diff
61 | *.woff2 -text diff
62 |
--------------------------------------------------------------------------------
/web/.ht.router.php:
--------------------------------------------------------------------------------
1 |
7 |
8 | Require all denied
9 |
10 |
11 | Order allow,deny
12 |
13 |
14 |
15 | # Don't show directory listings for URLs which map to a directory.
16 | Options -Indexes
17 |
18 | # Set the default handler.
19 | DirectoryIndex index.php index.html index.htm
20 |
21 | # Add correct encoding for SVGZ.
22 | AddType image/svg+xml svg svgz
23 | AddEncoding gzip svgz
24 |
25 | # Most of the following PHP settings cannot be changed at runtime. See
26 | # sites/default/default.settings.php and
27 | # Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
28 | # changed at runtime.
29 |
30 | # PHP 5, Apache 1 and 2.
31 |
32 | php_value assert.active 0
33 | php_flag session.auto_start off
34 | php_value mbstring.http_input pass
35 | php_value mbstring.http_output pass
36 | php_flag mbstring.encoding_translation off
37 | # PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is
38 | # not set.
39 | php_value always_populate_raw_post_data -1
40 |
41 |
42 | # Requires mod_expires to be enabled.
43 |
44 | # Enable expirations.
45 | ExpiresActive On
46 |
47 | # Cache all files for 2 weeks after access (A).
48 | ExpiresDefault A1209600
49 |
50 |
51 | # Do not allow PHP scripts to be cached unless they explicitly send cache
52 | # headers themselves. Otherwise all scripts would have to overwrite the
53 | # headers set by mod_expires if they want another caching behavior. This may
54 | # fail if an error occurs early in the bootstrap process, and it may cause
55 | # problems if a non-Drupal PHP file is installed in a subdirectory.
56 | ExpiresActive Off
57 |
58 |
59 |
60 | # Set a fallback resource if mod_rewrite is not enabled. This allows Drupal to
61 | # work without clean URLs. This requires Apache version >= 2.2.16. If Drupal is
62 | # not accessed by the top level URL (i.e.: http://example.com/drupal/ instead of
63 | # http://example.com/), the path to index.php will need to be adjusted.
64 |
65 | FallbackResource /index.php
66 |
67 |
68 | # Various rewrite rules.
69 |
70 | RewriteEngine on
71 |
72 | # Set "protossl" to "s" if we were accessed via https://. This is used later
73 | # if you enable "www." stripping or enforcement, in order to ensure that
74 | # you don't bounce between http and https.
75 | RewriteRule ^ - [E=protossl]
76 | RewriteCond %{HTTPS} on
77 | RewriteRule ^ - [E=protossl:s]
78 |
79 | # Make sure Authorization HTTP header is available to PHP
80 | # even when running as CGI or FastCGI.
81 | RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
82 |
83 | # Block access to "hidden" directories whose names begin with a period. This
84 | # includes directories used by version control systems such as Subversion or
85 | # Git to store control files. Files whose names begin with a period, as well
86 | # as the control files used by CVS, are protected by the FilesMatch directive
87 | # above.
88 | #
89 | # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
90 | # not possible to block access to entire directories from .htaccess because
91 | # is not allowed here.
92 | #
93 | # If you do not have mod_rewrite installed, you should remove these
94 | # directories from your webroot or otherwise protect them from being
95 | # downloaded.
96 | RewriteRule "/\.|^\.(?!well-known/)" - [F]
97 |
98 | # If your site can be accessed both with and without the 'www.' prefix, you
99 | # can use one of the following settings to redirect users to your preferred
100 | # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
101 | #
102 | # To redirect all users to access the site WITH the 'www.' prefix,
103 | # (http://example.com/foo will be redirected to http://www.example.com/foo)
104 | # uncomment the following:
105 | # RewriteCond %{HTTP_HOST} .
106 | # RewriteCond %{HTTP_HOST} !^www\. [NC]
107 | # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
108 | #
109 | # To redirect all users to access the site WITHOUT the 'www.' prefix,
110 | # (http://www.example.com/foo will be redirected to http://example.com/foo)
111 | # uncomment the following:
112 | # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
113 | # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
114 |
115 | # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
116 | # VirtualDocumentRoot and the rewrite rules are not working properly.
117 | # For example if your site is at http://example.com/drupal uncomment and
118 | # modify the following line:
119 | # RewriteBase /drupal
120 | #
121 | # If your site is running in a VirtualDocumentRoot at http://example.com/,
122 | # uncomment the following line:
123 | # RewriteBase /
124 |
125 | # Redirect common PHP files to their new locations.
126 | RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR]
127 | RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild.php)
128 | RewriteCond %{REQUEST_URI} !core
129 | RewriteRule ^ %1/core/%2 [L,QSA,R=301]
130 |
131 | # Rewrite install.php during installation to see if mod_rewrite is working
132 | RewriteRule ^core/install.php core/install.php?rewrite=ok [QSA,L]
133 |
134 | # Pass all requests not referring directly to files in the filesystem to
135 | # index.php.
136 | RewriteCond %{REQUEST_FILENAME} !-f
137 | RewriteCond %{REQUEST_FILENAME} !-d
138 | RewriteCond %{REQUEST_URI} !=/favicon.ico
139 | RewriteRule ^ index.php [L]
140 |
141 | # For security reasons, deny access to other PHP files on public sites.
142 | # Note: The following URI conditions are not anchored at the start (^),
143 | # because Drupal may be located in a subdirectory. To further improve
144 | # security, you can replace '!/' with '!^/'.
145 | # Allow access to PHP files in /core (like authorize.php or install.php):
146 | RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
147 | # Allow access to test-specific PHP files:
148 | RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php
149 | # Allow access to Statistics module's custom front controller.
150 | # Copy and adapt this rule to directly execute PHP files in contributed or
151 | # custom modules or to run another PHP application in the same directory.
152 | RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
153 | # Deny access to any other PHP files that do not match the rules above.
154 | # Specifically, disallow autoload.php from being served directly.
155 | RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
156 |
157 | # Rules to correctly serve gzip compressed CSS and JS files.
158 | # Requires both mod_rewrite and mod_headers to be enabled.
159 |
160 | # Serve gzip compressed CSS files if they exist and the client accepts gzip.
161 | RewriteCond %{HTTP:Accept-encoding} gzip
162 | RewriteCond %{REQUEST_FILENAME}\.gz -s
163 | RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
164 |
165 | # Serve gzip compressed JS files if they exist and the client accepts gzip.
166 | RewriteCond %{HTTP:Accept-encoding} gzip
167 | RewriteCond %{REQUEST_FILENAME}\.gz -s
168 | RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
169 |
170 | # Serve correct content types, and prevent mod_deflate double gzip.
171 | RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
172 | RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
173 |
174 |
175 | # Serve correct encoding type.
176 | Header set Content-Encoding gzip
177 | # Force proxies to cache gzipped & non-gzipped css/js files separately.
178 | Header append Vary Accept-Encoding
179 |
180 |
181 |
182 |
183 | # Various header fixes.
184 |
185 | # Disable content sniffing, since it's an attack vector.
186 | Header always set X-Content-Type-Options nosniff
187 | # Disable Proxy header, since it's an attack vector.
188 | RequestHeader unset Proxy
189 |
190 |
--------------------------------------------------------------------------------
/web/autoload.php:
--------------------------------------------------------------------------------
1 | handle($request);
20 | $response->send();
21 |
22 | $kernel->terminate($request, $response);
23 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/README.md:
--------------------------------------------------------------------------------
1 | How to create the default content?
2 | ===
3 | 0 You should have installed all dependencies.
4 |
5 | 1 Enable this module.
6 |
7 | 2 Execute
8 |
9 | drush mi --group=default_content --update
10 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/config/optional/migrate_plus.migration.dvt_default_content__node__todo.yml:
--------------------------------------------------------------------------------
1 | id: dvt_default_content__node__todo
2 | label: Default agency
3 | migration_group: default_content
4 | source:
5 | plugin: csv
6 | path: '/default_content/node__todo.csv'
7 | delimiter: ','
8 | enclosure: '"'
9 | header_row_count: 1
10 | keys:
11 | - id
12 | process:
13 | title: title
14 | field_done: completed
15 | uid:
16 | source: author
17 | plugin: migration_lookup
18 | migration:
19 | - dvt_default_content_user
20 | type:
21 | plugin: default_value
22 | default_value: todo
23 | destination:
24 | plugin: entity:node
25 | entity_type: node
26 | bundle: todo
27 | migration_dependencies:
28 | required:
29 | - dvt_default_content_user
30 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/config/optional/migrate_plus.migration.dvt_default_content_user.yml:
--------------------------------------------------------------------------------
1 | id: dvt_default_content_user
2 | label: Default users
3 | migration_group: default_content
4 | source:
5 | plugin: csv
6 | path: '/default_content/user.csv'
7 | delimiter: ','
8 | enclosure: '"'
9 | header_row_count: 1
10 | keys:
11 | - id
12 | process:
13 | name: username
14 | mail: email
15 | roles: roles
16 | pass:
17 | plugin: callback
18 | callable: md5
19 | source: password
20 | status: status
21 | destination:
22 | plugin: 'entity:user'
23 | md5_passwords: true
24 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/config/optional/migrate_plus.migration_group.default_content.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies: { }
4 | id: default_content
5 | label: Default content
6 | description: ''
7 | source_type: 'CSV'
8 | module: dvt_default_content
9 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/default_content/files/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/default_content/node__todo.csv:
--------------------------------------------------------------------------------
1 | id,title,author,completed
2 | todo_1,Buy milk,user_1,1
3 | todo_2,Do the Drupal and Vuejs talk,user_1,0
4 | todo_3,Important thing,user_1,0
5 | todo_4,Party time,user_2,0
6 | todo_5,short,user_2,1
7 | todo_6,"A very very very long item with a lot of words on the body so you can imagine what happens if some of them are longer than usual. Good to know, right? So lets see if everything works as expected",user_2,1
8 | todo_7,,user_2,1
9 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/default_content/user.csv:
--------------------------------------------------------------------------------
1 | id,username,email,roles,password,status
2 | user_1,user1,user1@test.test,authenticated,user1,1
3 | user_2,user2,user2@test.test,authenticated,user2,1
4 | user_3,user3,user3@test.test,authenticated,user3,1
5 | user_4,user4,user4@test.test,authenticated,user4,1
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/dvt_default_content.info.yml:
--------------------------------------------------------------------------------
1 | name: DVT Default Content
2 | type: module
3 | description: Creates default content for the website.
4 | core: 8.x
5 | package: DVT
6 | dependencies:
7 | - migrate_plus
8 | - migrate_tools
9 | - migrate_source_csv
10 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/dvt_default_content.module:
--------------------------------------------------------------------------------
1 | $item) {
18 | if ($item['migration_group'] == 'default_content') {
19 | $definitions[$key]['source']['path'] = $module_real_path . $definitions[$key]['source']['path'];
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_default_content/src/Plugin/migrate/process/FileImport.php:
--------------------------------------------------------------------------------
1 | getStorage('file')->create(['uri' => $uri]);
27 | $file->save();
28 | return $file->id();
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_rest_api/README.md:
--------------------------------------------------------------------------------
1 | # DVT Rest API
2 |
3 | ## Overview
4 |
5 | This module defines the custom resources to manage application data.
6 |
7 | ## Defined endpoints
8 |
9 | ### dvt_todos_resource
10 | ```
11 | GET all todos /api/v1/todos/all
12 |
13 | GET a specific todo /api/v1/todos/{todo_id}
14 |
15 | POST a todo /api/v1/todos {"title": ' - - - - ',"status":true/false}
16 |
17 | DELETE a todo /api/v1/todos/{todo_id}
18 |
19 | PATCH a todo /api/v1/todos/{todo_id} -> {"title": ' - - ',"status":true/false}
20 | ```
21 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_rest_api/config/install/rest.resource.dvt_todos_resource.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies:
4 | module:
5 | - basic_auth
6 | - dvt_rest_api
7 | - serialization
8 | - user
9 | id: dvt_todos_resource
10 | plugin_id: dvt_todos_resource
11 | granularity: resource
12 | configuration:
13 | methods:
14 | - GET
15 | - POST
16 | - DELETE
17 | - PATCH
18 | formats:
19 | - json
20 | authentication:
21 | - basic_auth
22 | - cookie
23 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_rest_api/dvt_rest_api.info.yml:
--------------------------------------------------------------------------------
1 | name: Drupal Vuejs todo REST API
2 | description: Define's REST Resources
3 | package: DVT
4 | type: module
5 | core: 8.x
6 | dependencies:
7 | - rest
8 | - hal
9 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_rest_api/dvt_rest_api.module:
--------------------------------------------------------------------------------
1 | bundle() == 'todo') {
18 | \Drupal::service('cache_tags.invalidator')->invalidateTags(['dvt_todos']);
19 | }
20 | }
21 |
22 | /**
23 | * Implements hook_node_delete().
24 | *
25 | * Invalidates todos cache.
26 | */
27 | function dvt_rest_api_node_delete(Node $node) {
28 | // Invalidates todos cache after any changes.
29 | if ($node->bundle() == 'todo') {
30 | \Drupal::service('cache_tags.invalidator')->invalidateTags(['dvt_todos']);
31 | }
32 | }
33 |
34 | /**
35 | * Implements hook_user_login().
36 | */
37 | function dvt_rest_api_user_login($account) {
38 | \Drupal::service('cache_tags.invalidator')->invalidateTags(['dvt_todos']);
39 | }
40 |
--------------------------------------------------------------------------------
/web/modules/custom/dvt_rest_api/src/Plugin/rest/resource/TodoResource.php:
--------------------------------------------------------------------------------
1 | nodeStorage = $node_storage;
71 | $this->currentUser = $current_user;
72 | }
73 |
74 | /**
75 | * {@inheritdoc}
76 | */
77 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
78 | return new static(
79 | $configuration,
80 | $plugin_id,
81 | $plugin_definition,
82 | $container->getParameter('serializer.formats'),
83 | $container->get('logger.factory')->get('dvt_todo_resource'),
84 | $container->get('entity.manager')->getStorage('node'),
85 | $container->get('current_user')
86 | );
87 | }
88 |
89 | /**
90 | * Responds to GET requests.
91 | *
92 | * @param mixed $id
93 | * Node ID of the item to get or "all" for get all todos.
94 | *
95 | * @return \Drupal\rest\ResourceResponse
96 | * Rest response.
97 | */
98 | public function get($id) {
99 | $query = $this->nodeStorage->getQuery()
100 | // Get only published todos.
101 | ->condition('status', 1)
102 | ->condition('type', 'todo')
103 | // Get only current user's todos.
104 | ->condition('uid', $this->currentUser->id());
105 |
106 | // If we're trying to get a specific todo.
107 | if ($id != 'all') {
108 | $query->condition('nid', $id);
109 | }
110 |
111 | $result = $query->execute();
112 |
113 | // Get nodes.
114 | $nodes = $this->nodeStorage->loadMultiple($result);
115 |
116 | $response = new ResourceResponse($nodes);
117 |
118 | // Alter caches.
119 | $response->getCacheableMetadata()
120 | ->addCacheTags(['dvt_todos']);
121 |
122 | return $response;
123 | }
124 |
125 | /**
126 | * Responds to PATCH requests.
127 | *
128 | * @param int $nid
129 | * Node to update.
130 | * @param array $payload
131 | * Data to insert on item.
132 | *
133 | * @return \Drupal\rest\ResourceResponse
134 | * Rest response.
135 | */
136 | public function patch(int $nid, array $payload) {
137 | // Check payload format.
138 | if (!isset($payload['title']) || !isset($payload['status'])) {
139 | throw new NotFoundHttpException('Missing parameters on payload.');
140 | }
141 |
142 | $node = $this->nodeStorage->load($nid);
143 |
144 | // If could not load the entity.
145 | if (!$node) {
146 | throw new NotFoundHttpException('Missing entity to edit.');
147 | }
148 | // @todo: It'll be nice control permissions before update. I'll not do it
149 | // to maintain the example ar simpler as possible.
150 | $node->set('title', $payload['title']);
151 | $node->set('field_done', $payload['status']);
152 |
153 | $node->save();
154 |
155 | $response = new ResourceResponse($node);
156 | return $response;
157 | }
158 |
159 | /**
160 | * Responds to POST requests.
161 | *
162 | * @param array $payload
163 | * Data to insert on item.
164 | *
165 | * @return \Drupal\rest\ResourceResponse
166 | * Rest response.
167 | */
168 | public function post(array $payload) {
169 | // Check payload format.
170 | if (!isset($payload['title']) || !isset($payload['status'])) {
171 | throw new NotFoundHttpException('Missing parameters on payload.');
172 | }
173 |
174 | // Create the node.
175 | $node = $this->nodeStorage->create([
176 | 'type' => 'todo',
177 | 'title' => $payload['title'],
178 | 'field_done' => $payload['status'],
179 | ]);
180 | $node->save();
181 |
182 | // Build a response with the created node.
183 | return new ResourceResponse($node);
184 | }
185 |
186 | /**
187 | * Responds to DELETE requests.
188 | *
189 | * @return \Drupal\rest\ResourceResponse
190 | * Rest response.
191 | */
192 | public function delete(int $nid) {
193 | $node = $this->nodeStorage->load($nid);
194 |
195 | // If could not load the entity.
196 | if (!$node) {
197 | throw new NotFoundHttpException('Missing entity to remove.');
198 | }
199 | $node->delete();
200 |
201 | $response = new ResourceResponse();
202 |
203 | return $response;
204 | }
205 |
206 | }
207 |
--------------------------------------------------------------------------------
/web/profiles/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/web/profiles/.gitkeep
--------------------------------------------------------------------------------
/web/robots.txt:
--------------------------------------------------------------------------------
1 | #
2 | # robots.txt
3 | #
4 | # This file is to prevent the crawling and indexing of certain parts
5 | # of your site by web crawlers and spiders run by sites like Yahoo!
6 | # and Google. By telling these "robots" where not to go on your site,
7 | # you save bandwidth and server resources.
8 | #
9 | # This file will be ignored unless it is at the root of your host:
10 | # Used: http://example.com/robots.txt
11 | # Ignored: http://example.com/site/robots.txt
12 | #
13 | # For more information about the robots.txt standard, see:
14 | # http://www.robotstxt.org/robotstxt.html
15 |
16 | User-agent: *
17 | # CSS, JS, Images
18 | Allow: /core/*.css$
19 | Allow: /core/*.css?
20 | Allow: /core/*.js$
21 | Allow: /core/*.js?
22 | Allow: /core/*.gif
23 | Allow: /core/*.jpg
24 | Allow: /core/*.jpeg
25 | Allow: /core/*.png
26 | Allow: /core/*.svg
27 | Allow: /profiles/*.css$
28 | Allow: /profiles/*.css?
29 | Allow: /profiles/*.js$
30 | Allow: /profiles/*.js?
31 | Allow: /profiles/*.gif
32 | Allow: /profiles/*.jpg
33 | Allow: /profiles/*.jpeg
34 | Allow: /profiles/*.png
35 | Allow: /profiles/*.svg
36 | # Directories
37 | Disallow: /core/
38 | Disallow: /profiles/
39 | # Files
40 | Disallow: /README.txt
41 | Disallow: /web.config
42 | # Paths (clean URLs)
43 | Disallow: /admin/
44 | Disallow: /comment/reply/
45 | Disallow: /filter/tips/
46 | Disallow: /node/add/
47 | Disallow: /search/
48 | Disallow: /user/register/
49 | Disallow: /user/password/
50 | Disallow: /user/login/
51 | Disallow: /user/logout/
52 | # Paths (no clean URLs)
53 | Disallow: /index.php/admin/
54 | Disallow: /index.php/comment/reply/
55 | Disallow: /index.php/filter/tips/
56 | Disallow: /index.php/node/add/
57 | Disallow: /index.php/search/
58 | Disallow: /index.php/user/password/
59 | Disallow: /index.php/user/register/
60 | Disallow: /index.php/user/login/
61 | Disallow: /index.php/user/logout/
62 |
--------------------------------------------------------------------------------
/web/sites/default/default.services.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | session.storage.options:
3 | # Default ini options for sessions.
4 | #
5 | # Some distributions of Linux (most notably Debian) ship their PHP
6 | # installations with garbage collection (gc) disabled. Since Drupal depends
7 | # on PHP's garbage collection for clearing sessions, ensure that garbage
8 | # collection occurs by using the most common settings.
9 | # @default 1
10 | gc_probability: 1
11 | # @default 100
12 | gc_divisor: 100
13 | #
14 | # Set session lifetime (in seconds), i.e. the time from the user's last
15 | # visit to the active session may be deleted by the session garbage
16 | # collector. When a session is deleted, authenticated users are logged out,
17 | # and the contents of the user's $_SESSION variable is discarded.
18 | # @default 200000
19 | gc_maxlifetime: 200000
20 | #
21 | # Set session cookie lifetime (in seconds), i.e. the time from the session
22 | # is created to the cookie expires, i.e. when the browser is expected to
23 | # discard the cookie. The value 0 means "until the browser is closed".
24 | # @default 2000000
25 | cookie_lifetime: 2000000
26 | #
27 | # Drupal automatically generates a unique session cookie name based on the
28 | # full domain name used to access the site. This mechanism is sufficient
29 | # for most use-cases, including multi-site deployments. However, if it is
30 | # desired that a session can be reused across different subdomains, the
31 | # cookie domain needs to be set to the shared base domain. Doing so assures
32 | # that users remain logged in as they cross between various subdomains.
33 | # To maximize compatibility and normalize the behavior across user agents,
34 | # the cookie domain should start with a dot.
35 | #
36 | # @default none
37 | # cookie_domain: '.example.com'
38 | #
39 | twig.config:
40 | # Twig debugging:
41 | #
42 | # When debugging is enabled:
43 | # - The markup of each Twig template is surrounded by HTML comments that
44 | # contain theming information, such as template file name suggestions.
45 | # - Note that this debugging markup will cause automated tests that directly
46 | # check rendered HTML to fail. When running automated tests, 'debug'
47 | # should be set to FALSE.
48 | # - The dump() function can be used in Twig templates to output information
49 | # about template variables.
50 | # - Twig templates are automatically recompiled whenever the source code
51 | # changes (see auto_reload below).
52 | #
53 | # For more information about debugging Twig templates, see
54 | # https://www.drupal.org/node/1906392.
55 | #
56 | # Not recommended in production environments
57 | # @default false
58 | debug: false
59 | # Twig auto-reload:
60 | #
61 | # Automatically recompile Twig templates whenever the source code changes.
62 | # If you don't provide a value for auto_reload, it will be determined
63 | # based on the value of debug.
64 | #
65 | # Not recommended in production environments
66 | # @default null
67 | auto_reload: null
68 | # Twig cache:
69 | #
70 | # By default, Twig templates will be compiled and stored in the filesystem
71 | # to increase performance. Disabling the Twig cache will recompile the
72 | # templates from source each time they are used. In most cases the
73 | # auto_reload setting above should be enabled rather than disabling the
74 | # Twig cache.
75 | #
76 | # Not recommended in production environments
77 | # @default true
78 | cache: true
79 | renderer.config:
80 | # Renderer required cache contexts:
81 | #
82 | # The Renderer will automatically associate these cache contexts with every
83 | # render array, hence varying every render array by these cache contexts.
84 | #
85 | # @default ['languages:language_interface', 'theme', 'user.permissions']
86 | required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
87 | # Renderer automatic placeholdering conditions:
88 | #
89 | # Drupal allows portions of the page to be automatically deferred when
90 | # rendering to improve cache performance. That is especially helpful for
91 | # cache contexts that vary widely, such as the active user. On some sites
92 | # those may be different, however, such as sites with only a handful of
93 | # users. If you know what the high-cardinality cache contexts are for your
94 | # site, specify those here. If you're not sure, the defaults are fairly safe
95 | # in general.
96 | #
97 | # For more information about rendering optimizations see
98 | # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
99 | auto_placeholder_conditions:
100 | # Max-age at or below which caching is not considered worthwhile.
101 | #
102 | # Disable by setting to -1.
103 | #
104 | # @default 0
105 | max-age: 0
106 | # Cache contexts with a high cardinality.
107 | #
108 | # Disable by setting to [].
109 | #
110 | # @default ['session', 'user']
111 | contexts: ['session', 'user']
112 | # Tags with a high invalidation frequency.
113 | #
114 | # Disable by setting to [].
115 | #
116 | # @default []
117 | tags: []
118 | # Cacheability debugging:
119 | #
120 | # Responses with cacheability metadata (CacheableResponseInterface instances)
121 | # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
122 | #
123 | # For more information about debugging cacheable responses, see
124 | # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
125 | #
126 | # Not recommended in production environments
127 | # @default false
128 | http.response.debug_cacheability_headers: false
129 | factory.keyvalue:
130 | {}
131 | # Default key/value storage service to use.
132 | # @default keyvalue.database
133 | # default: keyvalue.database
134 | # Collection-specific overrides.
135 | # state: keyvalue.database
136 | factory.keyvalue.expirable:
137 | {}
138 | # Default key/value expirable storage service to use.
139 | # @default keyvalue.database.expirable
140 | # default: keyvalue.database.expirable
141 | # Allowed protocols for URL generation.
142 | filter_protocols:
143 | - http
144 | - https
145 | - ftp
146 | - news
147 | - nntp
148 | - tel
149 | - telnet
150 | - mailto
151 | - irc
152 | - ssh
153 | - sftp
154 | - webcal
155 | - rtsp
156 |
157 | # Configure Cross-Site HTTP requests (CORS).
158 | # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
159 | # for more information about the topic in general.
160 | # Note: By default the configuration is disabled.
161 | cors.config:
162 | enabled: false
163 | # Specify allowed headers, like 'x-allowed-header'.
164 | allowedHeaders: []
165 | # Specify allowed request methods, specify ['*'] to allow all possible ones.
166 | allowedMethods: []
167 | # Configure requests allowed from specific origins.
168 | allowedOrigins: ['*']
169 | # Sets the Access-Control-Expose-Headers header.
170 | exposedHeaders: false
171 | # Sets the Access-Control-Max-Age header.
172 | maxAge: false
173 | # Sets the Access-Control-Allow-Credentials header.
174 | supportsCredentials: false
175 |
--------------------------------------------------------------------------------
/web/sites/default/example.settings.local.php:
--------------------------------------------------------------------------------
1 | 'dvt_local',
142 | 'username' => 'root',
143 | 'password' => 'root',
144 | 'prefix' => '',
145 | 'host' => 'localhost',
146 | 'port' => '',
147 | 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
148 | 'driver' => 'mysql',
149 | );
150 | $settings['install_profile'] = 'minimal';
151 | $config_directories['sync'] = '../config/sync';
152 |
--------------------------------------------------------------------------------
/web/sites/default/services.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | session.storage.options:
3 | # Default ini options for sessions.
4 | #
5 | # Some distributions of Linux (most notably Debian) ship their PHP
6 | # installations with garbage collection (gc) disabled. Since Drupal depends
7 | # on PHP's garbage collection for clearing sessions, ensure that garbage
8 | # collection occurs by using the most common settings.
9 | # @default 1
10 | gc_probability: 1
11 | # @default 100
12 | gc_divisor: 100
13 | #
14 | # Set session lifetime (in seconds), i.e. the time from the user's last
15 | # visit to the active session may be deleted by the session garbage
16 | # collector. When a session is deleted, authenticated users are logged out,
17 | # and the contents of the user's $_SESSION variable is discarded.
18 | # @default 200000
19 | gc_maxlifetime: 200000
20 | #
21 | # Set session cookie lifetime (in seconds), i.e. the time from the session
22 | # is created to the cookie expires, i.e. when the browser is expected to
23 | # discard the cookie. The value 0 means "until the browser is closed".
24 | # @default 2000000
25 | cookie_lifetime: 2000000
26 | #
27 | # Drupal automatically generates a unique session cookie name based on the
28 | # full domain name used to access the site. This mechanism is sufficient
29 | # for most use-cases, including multi-site deployments. However, if it is
30 | # desired that a session can be reused across different subdomains, the
31 | # cookie domain needs to be set to the shared base domain. Doing so assures
32 | # that users remain logged in as they cross between various subdomains.
33 | # To maximize compatibility and normalize the behavior across user agents,
34 | # the cookie domain should start with a dot.
35 | #
36 | # @default none
37 | # cookie_domain: '.example.com'
38 | #
39 | twig.config:
40 | # Twig debugging:
41 | #
42 | # When debugging is enabled:
43 | # - The markup of each Twig template is surrounded by HTML comments that
44 | # contain theming information, such as template file name suggestions.
45 | # - Note that this debugging markup will cause automated tests that directly
46 | # check rendered HTML to fail. When running automated tests, 'debug'
47 | # should be set to FALSE.
48 | # - The dump() function can be used in Twig templates to output information
49 | # about template variables.
50 | # - Twig templates are automatically recompiled whenever the source code
51 | # changes (see auto_reload below).
52 | #
53 | # For more information about debugging Twig templates, see
54 | # https://www.drupal.org/node/1906392.
55 | #
56 | # Not recommended in production environments
57 | # @default false
58 | debug: false
59 | # Twig auto-reload:
60 | #
61 | # Automatically recompile Twig templates whenever the source code changes.
62 | # If you don't provide a value for auto_reload, it will be determined
63 | # based on the value of debug.
64 | #
65 | # Not recommended in production environments
66 | # @default null
67 | auto_reload: null
68 | # Twig cache:
69 | #
70 | # By default, Twig templates will be compiled and stored in the filesystem
71 | # to increase performance. Disabling the Twig cache will recompile the
72 | # templates from source each time they are used. In most cases the
73 | # auto_reload setting above should be enabled rather than disabling the
74 | # Twig cache.
75 | #
76 | # Not recommended in production environments
77 | # @default true
78 | cache: true
79 | renderer.config:
80 | # Renderer required cache contexts:
81 | #
82 | # The Renderer will automatically associate these cache contexts with every
83 | # render array, hence varying every render array by these cache contexts.
84 | #
85 | # @default ['languages:language_interface', 'theme', 'user.permissions']
86 | required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
87 | # Renderer automatic placeholdering conditions:
88 | #
89 | # Drupal allows portions of the page to be automatically deferred when
90 | # rendering to improve cache performance. That is especially helpful for
91 | # cache contexts that vary widely, such as the active user. On some sites
92 | # those may be different, however, such as sites with only a handful of
93 | # users. If you know what the high-cardinality cache contexts are for your
94 | # site, specify those here. If you're not sure, the defaults are fairly safe
95 | # in general.
96 | #
97 | # For more information about rendering optimizations see
98 | # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
99 | auto_placeholder_conditions:
100 | # Max-age at or below which caching is not considered worthwhile.
101 | #
102 | # Disable by setting to -1.
103 | #
104 | # @default 0
105 | max-age: 0
106 | # Cache contexts with a high cardinality.
107 | #
108 | # Disable by setting to [].
109 | #
110 | # @default ['session', 'user']
111 | contexts: ['session', 'user']
112 | # Tags with a high invalidation frequency.
113 | #
114 | # Disable by setting to [].
115 | #
116 | # @default []
117 | tags: []
118 | # Cacheability debugging:
119 | #
120 | # Responses with cacheability metadata (CacheableResponseInterface instances)
121 | # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
122 | #
123 | # For more information about debugging cacheable responses, see
124 | # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
125 | #
126 | # Not recommended in production environments
127 | # @default false
128 | http.response.debug_cacheability_headers: false
129 | factory.keyvalue:
130 | {}
131 | # Default key/value storage service to use.
132 | # @default keyvalue.database
133 | # default: keyvalue.database
134 | # Collection-specific overrides.
135 | # state: keyvalue.database
136 | factory.keyvalue.expirable:
137 | {}
138 | # Default key/value expirable storage service to use.
139 | # @default keyvalue.database.expirable
140 | # default: keyvalue.database.expirable
141 | # Allowed protocols for URL generation.
142 | filter_protocols:
143 | - http
144 | - https
145 | - ftp
146 | - news
147 | - nntp
148 | - tel
149 | - telnet
150 | - mailto
151 | - irc
152 | - ssh
153 | - sftp
154 | - webcal
155 | - rtsp
156 |
157 | # Configure Cross-Site HTTP requests (CORS).
158 | # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
159 | # for more information about the topic in general.
160 | # Note: By default the configuration is disabled.
161 | cors.config:
162 | enabled: true
163 | # Specify allowed headers, like 'x-allowed-header'.
164 | allowedHeaders: ['*']
165 | # Specify allowed request methods, specify ['*'] to allow all possible ones.
166 | allowedMethods: ['*']
167 | # Configure requests allowed from specific origins.
168 | allowedOrigins: ['*']
169 | # Sets the Access-Control-Expose-Headers header.
170 | exposedHeaders: false
171 | # Sets the Access-Control-Max-Age header.
172 | maxAge: false
173 | # Sets the Access-Control-Allow-Credentials header.
174 | supportsCredentials: true
175 |
--------------------------------------------------------------------------------
/web/sites/development.services.yml:
--------------------------------------------------------------------------------
1 | # Local development services.
2 | #
3 | # To activate this feature, follow the instructions at the top of the
4 | # 'example.settings.local.php' file, which sits next to this file.
5 | parameters:
6 | http.response.debug_cacheability_headers: true
7 | services:
8 | cache.backend.null:
9 | class: Drupal\Core\Cache\NullBackendFactory
10 |
--------------------------------------------------------------------------------
/web/sites/example.sites.php:
--------------------------------------------------------------------------------
1 | ..' => 'directory'. As an
26 | * example, to map https://www.drupal.org:8080/mysite/test to the configuration
27 | * directory sites/example.com, the array should be defined as:
28 | * @code
29 | * $sites = array(
30 | * '8080.www.drupal.org.mysite.test' => 'example.com',
31 | * );
32 | * @endcode
33 | * The URL, https://www.drupal.org:8080/mysite/test/, could be a symbolic link
34 | * or an Apache Alias directive that points to the Drupal root containing
35 | * index.php. An alias could also be created for a subdomain. See the
36 | * @link https://www.drupal.org/documentation/install online Drupal installation guide @endlink
37 | * for more information on setting up domains, subdomains, and subdirectories.
38 | *
39 | * The following examples look for a site configuration in sites/example.com:
40 | * @code
41 | * URL: http://dev.drupal.org
42 | * $sites['dev.drupal.org'] = 'example.com';
43 | *
44 | * URL: http://localhost/example
45 | * $sites['localhost.example'] = 'example.com';
46 | *
47 | * URL: http://localhost:8080/example
48 | * $sites['8080.localhost.example'] = 'example.com';
49 | *
50 | * URL: https://www.drupal.org:8080/mysite/test/
51 | * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
52 | * @endcode
53 | *
54 | * @see default.settings.php
55 | * @see \Drupal\Core\DrupalKernel::getSitePath()
56 | * @see https://www.drupal.org/documentation/install/multi-site
57 | */
58 |
--------------------------------------------------------------------------------
/web/themes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alvar0hurtad0/drupal-vuejs-todo/f7aecd6a7643e9382930aa6c739bf79d2845d5fe/web/themes/.gitkeep
--------------------------------------------------------------------------------
/web/update.php:
--------------------------------------------------------------------------------
1 | handle($request);
29 | $response->send();
30 |
31 | $kernel->terminate($request, $response);
32 |
--------------------------------------------------------------------------------
/web/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
48 |
51 |
60 |
61 |
64 |
73 |
74 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------