diff --git a/.env b/.env deleted file mode 100644 index 593d64a..0000000 --- a/.env +++ /dev/null @@ -1,15 +0,0 @@ -DRUPAL_DATABASE_NAME=ddd -DRUPAL_DATABASE_USERNAME=root -DRUPAL_DATABASE_PASSWORD= -DRUPAL_DATABASE_PREFIX= -DRUPAL_DATABASE_HOST=mysql -DRUPAL_DATABASE_PORT=3306 -DRUPAL_TRUSTED_HOST_PATTERNS=".*" - -DRUPAL_ACCOUNT_USERNAME=admin -DRUPAL_ACCOUNT_PASSWORD=admin -DRUPAL_ACCOUNT_EMAIL=abel.santos.corral@gmail.com - -DRUPAL_BASE_URL=http://web:8080/web -VIRTUAL_HOST=http://web:8080/web -DRUSH_OPTIONS_URI=http://web:8080/web diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..037b98b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: First workflow + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Hello Codelies! + run: echo "Hello!!!! from ${{ github.workflow }} triggered by the ${{ github.event_name }} done by ${{ github.actor }}" + + - name: 💩 Moren more + env: + JOB_CONTEXT: ${{ toJson(job) }} + run: | + echo "Job Context: $JOB_CONTEXT" + echo "Done!" diff --git a/README.md b/README.md index 541be07..c2d6fb3 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ and [Docker Compose](https://docs.docker.com/compose/install/) The project ships with default configuration in the `runner.yml.dist` file. This file is configured to run the website on the provided docker containers. If you -are happy using those, you can skip directly to the -[installing the project](#14-installing-the-project) section. You can customize -the default configuration by copying `runner.yml.dist` to `runner.yml` and -changing for example the connection details for your database server and +are happy using those, you can skip directly to the +[installing the project](#14-installing-the-project) section. You can customize +the default configuration by copying `runner.yml.dist` to `runner.yml` and +changing for example the connection details for your database server and selenium server. ### 1.3 Setting up the environment @@ -51,15 +51,15 @@ alias dcweb="docker-compose exec web" ```bash # Run composer install in the web service. -dcweb composer install +docker-compose exec web composer install # Build your development instance of the website. -dcweb ./vendor/bin/run toolkit:build-dev +docker-compose exec web ./vendor/bin/run toolkit:build-dev # Perform a clean installation of the website. -dcweb ./vendor/bin/run toolkit:install-clean +docker-compose exec web ./vendor/bin/run toolkit:install-clean # Perform a clone installation with production data. -dcweb ./vendor/bin/run toolkit:install-clone +docker-compose exec web ./vendor/bin/run toolkit:install-clone # Get the uri to start working on the browser. -dcweb ./vendor/bin/drush uli --uri=http://localhost:8080/web/ +docker-compose exec web ./vendor/bin/drush uli --uri=http://localhost:8080/web/ ``` Using default configuration your Drupal site will be available locally at: @@ -82,11 +82,11 @@ setting up a project there it will be available at either: ```bash # Run coding standard checks. -dcweb ./vendor/bin/run toolkit:test-phpcs +docker-compose exec web ./vendor/bin/run toolkit:test-phpcs # Run behat tests on a clean installation. -dcweb ./vendor/bin/run toolkit:test-behat +docker-compose exec web ./vendor/bin/run toolkit:test-behat # Run behat tests on a clone installation. -dcweb ./vendor/bin/run toolkit:test-behat -D "behat.tags=@clone" +docker-compose exec web ./vendor/bin/run toolkit:test-behat -D "behat.tags=@clone" ``` ### 1.6 Updating composer.lock @@ -95,5 +95,9 @@ When having a conflict on the composer.lock file it is best to solve the conflict manually and then update the lock file. ```bash -dcweb composer update --lock +docker-compose exec web composer update --lock ``` + +# Github Actions + +Added workflows at the github folder. Trying new stuff. diff --git a/composer.json b/composer.json index 9e94304..7d49c52 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,18 @@ "php": ">=8.1", "composer/installers": "^2.2", "cweagans/composer-patches": "^1.7", - "drupal/core": "^10", - "drupal/core-composer-scaffold": "10.2.0", - "drupal/core-project-message": "10.2.0", - "drupal/core-recommended": "10.2.0", + "drupal/admin_toolbar": "^3.4", + "drupal/core": "^10.2", + "drupal/core-composer-scaffold": "^10.2", + "drupal/core-project-message": "^10.2", + "drupal/core-recommended": "^10.2", + "drupal/default_content": "^2.0@alpha", + "drupal/search_api": "^1.31", "drush/drush": "^11 | ^12" }, "require-dev": { "behat/mink-goutte-driver": "^1.0 || ^2.0", + "drupal/config_devel": "^1.9", "drupal/core-dev": "^10", "drupal/drupal-driver": "^2.2.0", "drupal/drupal-extension": "~4.0 || ^5", diff --git a/composer.lock b/composer.lock index 95688ca..81b2df2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "08b011105635149e9fbacb1028eeaf32", + "content-hash": "153b2890c968c126273e6d6e1a424f09", "packages": [ { "name": "asm89/stack-cors", @@ -1065,16 +1065,16 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -1106,22 +1106,22 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/lexer", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", + "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", "shasum": "" }, "require": { @@ -1129,11 +1129,11 @@ "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", + "doctrine/coding-standard": "^9 || ^12", "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" + "vimeo/psalm": "^4.11 || ^5.21" }, "type": "library", "autoload": { @@ -1170,7 +1170,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" + "source": "https://github.com/doctrine/lexer/tree/2.1.1" }, "funding": [ { @@ -1186,20 +1186,101 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2024-02-05T11:35:39+00:00" + }, + { + "name": "drupal/admin_toolbar", + "version": "3.4.2", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/admin_toolbar.git", + "reference": "3.4.2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/admin_toolbar-3.4.2.zip", + "reference": "3.4.2", + "shasum": "f5a008e5c73f5a11c6c8067c0ea6ebb76aa33854" + }, + "require": { + "drupal/core": "^9.2 || ^10" + }, + "require-dev": { + "drupal/admin_toolbar_tools": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "3.4.2", + "datestamp": "1696006195", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Wilfrid Roze (eme)", + "homepage": "https://www.drupal.org/u/eme", + "role": "Maintainer" + }, + { + "name": "Romain Jarraud (romainj)", + "homepage": "https://www.drupal.org/u/romainj", + "role": "Maintainer" + }, + { + "name": "Adrian Cid Almaguer (adriancid)", + "homepage": "https://www.drupal.org/u/adriancid", + "email": "adriancid@gmail.com", + "role": "Maintainer" + }, + { + "name": "Mohamed Anis Taktak (matio89)", + "homepage": "https://www.drupal.org/u/matio89", + "role": "Maintainer" + }, + { + "name": "matio89", + "homepage": "https://www.drupal.org/user/2320090" + }, + { + "name": "Musa.thomas", + "homepage": "https://www.drupal.org/user/1213824" + }, + { + "name": "romainj", + "homepage": "https://www.drupal.org/user/370706" + } + ], + "description": "Provides a drop-down menu interface to the core Drupal Toolbar.", + "homepage": "http://drupal.org/project/admin_toolbar", + "keywords": [ + "Drupal", + "Toolbar" + ], + "support": { + "source": "https://git.drupalcode.org/project/admin_toolbar", + "issues": "https://www.drupal.org/project/issues/admin_toolbar" + } }, { "name": "drupal/core", - "version": "10.2.0", + "version": "10.2.4", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "2f6c400cd6200f6e5900754e7e363cac811546b8" + "reference": "d1c5b44adfc79bda03252471491b0fba89d87eff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/2f6c400cd6200f6e5900754e7e363cac811546b8", - "reference": "2f6c400cd6200f6e5900754e7e363cac811546b8", + "url": "https://api.github.com/repos/drupal/core/zipball/d1c5b44adfc79bda03252471491b0fba89d87eff", + "reference": "d1c5b44adfc79bda03252471491b0fba89d87eff", "shasum": "" }, "require": { @@ -1347,22 +1428,22 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/10.2.0" + "source": "https://github.com/drupal/core/tree/10.2.4" }, - "time": "2023-12-15T22:46:04+00:00" + "time": "2024-03-06T08:23:56+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "10.2.0", + "version": "10.2.4", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", - "reference": "97bd91856535a354e9b1b815f0957893e26b6622" + "reference": "63effa1bc644e80a269e8b4415e627491d26fd3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-composer-scaffold/zipball/97bd91856535a354e9b1b815f0957893e26b6622", - "reference": "97bd91856535a354e9b1b815f0957893e26b6622", + "url": "https://api.github.com/repos/drupal/core-composer-scaffold/zipball/63effa1bc644e80a269e8b4415e627491d26fd3f", + "reference": "63effa1bc644e80a269e8b4415e627491d26fd3f", "shasum": "" }, "require": { @@ -1397,13 +1478,13 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/10.2.0" + "source": "https://github.com/drupal/core-composer-scaffold/tree/10.2.4" }, - "time": "2023-11-15T23:23:28+00:00" + "time": "2024-01-26T14:59:30+00:00" }, { "name": "drupal/core-project-message", - "version": "10.2.0", + "version": "10.2.4", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", @@ -1438,22 +1519,22 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-project-message/tree/10.2.0" + "source": "https://github.com/drupal/core-project-message/tree/10.2.4" }, "time": "2023-07-24T07:55:25+00:00" }, { "name": "drupal/core-recommended", - "version": "10.2.0", + "version": "10.2.4", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "13b68ef925c75455fd6cb6766d5879790727d83f" + "reference": "550c4cb19afda15ef892d88469ab93dc38bf0b46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/13b68ef925c75455fd6cb6766d5879790727d83f", - "reference": "13b68ef925c75455fd6cb6766d5879790727d83f", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/550c4cb19afda15ef892d88469ab93dc38bf0b46", + "reference": "550c4cb19afda15ef892d88469ab93dc38bf0b46", "shasum": "" }, "require": { @@ -1462,7 +1543,7 @@ "doctrine/annotations": "~1.14.3", "doctrine/deprecations": "~1.1.2", "doctrine/lexer": "~2.1.0", - "drupal/core": "10.2.0", + "drupal/core": "10.2.4", "egulias/email-validator": "~4.0.2", "guzzlehttp/guzzle": "~7.8.1", "guzzlehttp/promises": "~2.0.2", @@ -1523,9 +1604,158 @@ ], "description": "Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/10.2.0" + "source": "https://github.com/drupal/core-recommended/tree/10.2.4" + }, + "time": "2024-03-06T08:23:56+00:00" + }, + { + "name": "drupal/default_content", + "version": "2.0.0-alpha2", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/default_content.git", + "reference": "2.0.0-alpha2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/default_content-2.0.0-alpha2.zip", + "reference": "2.0.0-alpha2", + "shasum": "5c365ea21b0be63dc00ec2db50179291d6fb3d89" + }, + "require": { + "drupal/core": "^9.1 || ^10" }, - "time": "2023-12-15T22:46:04+00:00" + "require-dev": { + "drupal/hal": " ^9 || ^1 || ^2", + "drupal/paragraphs": "^1" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0-alpha2", + "datestamp": "1659466706", + "security-coverage": { + "status": "not-covered", + "message": "Alpha releases are not covered by Drupal security advisories." + } + }, + "drush": { + "services": { + "drush.services.yml": "^9 || ^10 || ^11" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "andypost", + "homepage": "https://www.drupal.org/user/118908" + }, + { + "name": "benjy", + "homepage": "https://www.drupal.org/user/1852732" + }, + { + "name": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "dawehner", + "homepage": "https://www.drupal.org/user/99340" + }, + { + "name": "jibran", + "homepage": "https://www.drupal.org/user/1198144" + }, + { + "name": "larowlan", + "homepage": "https://www.drupal.org/user/395439" + }, + { + "name": "Sam152", + "homepage": "https://www.drupal.org/user/1485048" + } + ], + "description": "Imports default content when a module is enabled", + "homepage": "https://www.drupal.org/project/default_content", + "support": { + "source": "https://git.drupalcode.org/project/default_content" + } + }, + { + "name": "drupal/search_api", + "version": "1.31.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/search_api.git", + "reference": "8.x-1.31" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.31.zip", + "reference": "8.x-1.31", + "shasum": "ec8436744c34de2ede6370d4dd26875489e761bc" + }, + "require": { + "drupal/core": "^10.0" + }, + "conflict": { + "drupal/search_api_solr": "2.* || 3.0 || 3.1" + }, + "require-dev": { + "drupal/language_fallback_fix": "@dev", + "drupal/search_api_autocomplete": "@dev", + "drupal/search_api_db": "*" + }, + "suggest": { + "drupal/facets": "Adds the ability to create faceted searches.", + "drupal/search_api_autocomplete": "Allows adding autocomplete suggestions to search fields.", + "drupal/search_api_solr": "Adds support for using Apache Solr as a backend." + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.31", + "datestamp": "1700926323", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9 || ^10 || ^11" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Thomas Seidl", + "homepage": "https://www.drupal.org/u/drunken-monkey" + }, + { + "name": "Nick Veenhof", + "homepage": "https://www.drupal.org/u/nick_vh" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/790418/committers" + } + ], + "description": "Provides a generic framework for modules offering search capabilities.", + "homepage": "https://www.drupal.org/project/search_api", + "support": { + "source": "https://git.drupalcode.org/project/search_api", + "issues": "https://www.drupal.org/project/issues/search_api", + "irc": "irc://irc.freenode.org/drupal-search-api" + } }, { "name": "drush/drush", @@ -2558,16 +2788,16 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.14", + "version": "v1.10.15", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "a86fc145edb5caedbf96527214ce3cadc9de4a32" + "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/a86fc145edb5caedbf96527214ce3cadc9de4a32", - "reference": "a86fc145edb5caedbf96527214ce3cadc9de4a32", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/ce0adade8b97561656ace07cdaac4751c271ea8c", + "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c", "shasum": "" }, "require": { @@ -2580,9 +2810,9 @@ }, "type": "library", "autoload": { - "psr-0": { - "": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "include-path": [ @@ -2603,7 +2833,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2023-11-26T16:15:38+00:00" + "time": "2024-03-16T18:41:45+00:00" }, { "name": "pear/pear_exception", @@ -3307,16 +3537,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -3361,7 +3591,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -3369,20 +3599,20 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0d9e4eb5ad413075624378f474c4167ea202de78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0d9e4eb5ad413075624378f474c4167ea202de78", + "reference": "0d9e4eb5ad413075624378f474c4167ea202de78", "shasum": "" }, "require": { @@ -3447,7 +3677,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.4" }, "funding": [ { @@ -3463,20 +3693,20 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2024-02-22T20:27:10+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.1", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f88ff6428afbeb17cc648c8003bd608534750baf" + "reference": "6236e5e843cb763e9d0f74245678b994afea5363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f88ff6428afbeb17cc648c8003bd608534750baf", - "reference": "f88ff6428afbeb17cc648c8003bd608534750baf", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6236e5e843cb763e9d0f74245678b994afea5363", + "reference": "6236e5e843cb763e9d0f74245678b994afea5363", "shasum": "" }, "require": { @@ -3528,7 +3758,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.1" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.4" }, "funding": [ { @@ -3544,7 +3774,7 @@ "type": "tidelift" } ], - "time": "2023-12-01T14:56:37+00:00" + "time": "2024-02-22T20:27:10+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3615,16 +3845,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.0", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c873490a1c97b3a0a4838afc36ff36c112d02788" + "reference": "c725219bdf2afc59423c32793d5019d2a904e13a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c873490a1c97b3a0a4838afc36ff36c112d02788", - "reference": "c873490a1c97b3a0a4838afc36ff36c112d02788", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/c725219bdf2afc59423c32793d5019d2a904e13a", + "reference": "c725219bdf2afc59423c32793d5019d2a904e13a", "shasum": "" }, "require": { @@ -3670,7 +3900,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.0" + "source": "https://github.com/symfony/error-handler/tree/v6.4.4" }, "funding": [ { @@ -3686,20 +3916,20 @@ "type": "tidelift" } ], - "time": "2023-10-18T09:43:34+00:00" + "time": "2024-02-22T20:27:10+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d76d2632cfc2206eecb5ad2b26cd5934082941b6" + "reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d76d2632cfc2206eecb5ad2b26cd5934082941b6", - "reference": "d76d2632cfc2206eecb5ad2b26cd5934082941b6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae9d3a6f3003a6caf56acd7466d8d52378d44fef", + "reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef", "shasum": "" }, "require": { @@ -3750,7 +3980,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.3" }, "funding": [ { @@ -3766,7 +3996,7 @@ "type": "tidelift" } ], - "time": "2023-07-27T06:52:43+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3846,16 +4076,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59" + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/952a8cb588c3bc6ce76f6023000fb932f16a6e59", - "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", "shasum": "" }, "require": { @@ -3889,7 +4119,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.0" + "source": "https://github.com/symfony/filesystem/tree/v6.4.3" }, "funding": [ { @@ -3905,7 +4135,7 @@ "type": "tidelift" } ], - "time": "2023-07-26T17:27:13+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/finder", @@ -3973,16 +4203,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.4.0", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "44a6d39a9cc11e154547d882d5aac1e014440771" + "reference": "ebc713bc6e6f4b53f46539fc158be85dfcd77304" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/44a6d39a9cc11e154547d882d5aac1e014440771", - "reference": "44a6d39a9cc11e154547d882d5aac1e014440771", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ebc713bc6e6f4b53f46539fc158be85dfcd77304", + "reference": "ebc713bc6e6f4b53f46539fc158be85dfcd77304", "shasum": "" }, "require": { @@ -4030,7 +4260,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.0" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.4" }, "funding": [ { @@ -4046,20 +4276,20 @@ "type": "tidelift" } ], - "time": "2023-11-20T16:41:16+00:00" + "time": "2024-02-08T15:01:18+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.1", + "version": "v6.4.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "2953274c16a229b3933ef73a6898e18388e12e1b" + "reference": "f6947cb939d8efee137797382cb4db1af653ef75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2953274c16a229b3933ef73a6898e18388e12e1b", - "reference": "2953274c16a229b3933ef73a6898e18388e12e1b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6947cb939d8efee137797382cb4db1af653ef75", + "reference": "f6947cb939d8efee137797382cb4db1af653ef75", "shasum": "" }, "require": { @@ -4108,7 +4338,7 @@ "symfony/process": "^5.4|^6.0|^7.0", "symfony/property-access": "^5.4.5|^6.0.5|^7.0", "symfony/routing": "^5.4|^6.0|^7.0", - "symfony/serializer": "^6.3|^7.0", + "symfony/serializer": "^6.4.4|^7.0.4", "symfony/stopwatch": "^5.4|^6.0|^7.0", "symfony/translation": "^5.4|^6.0|^7.0", "symfony/translation-contracts": "^2.5|^3", @@ -4143,7 +4373,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.1" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.5" }, "funding": [ { @@ -4159,20 +4389,20 @@ "type": "tidelift" } ], - "time": "2023-12-01T17:02:02+00:00" + "time": "2024-03-04T21:00:47+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.0", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba" + "reference": "791c5d31a8204cf3db0c66faab70282307f4376b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba", - "reference": "ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba", + "url": "https://api.github.com/repos/symfony/mailer/zipball/791c5d31a8204cf3db0c66faab70282307f4376b", + "reference": "791c5d31a8204cf3db0c66faab70282307f4376b", "shasum": "" }, "require": { @@ -4223,7 +4453,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.0" + "source": "https://github.com/symfony/mailer/tree/v6.4.4" }, "funding": [ { @@ -4239,20 +4469,20 @@ "type": "tidelift" } ], - "time": "2023-11-12T18:02:22+00:00" + "time": "2024-02-03T21:33:47+00:00" }, { "name": "symfony/mime", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ca4f58b2ef4baa8f6cecbeca2573f88cd577d205" + "reference": "5017e0a9398c77090b7694be46f20eb796262a34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ca4f58b2ef4baa8f6cecbeca2573f88cd577d205", - "reference": "ca4f58b2ef4baa8f6cecbeca2573f88cd577d205", + "url": "https://api.github.com/repos/symfony/mime/zipball/5017e0a9398c77090b7694be46f20eb796262a34", + "reference": "5017e0a9398c77090b7694be46f20eb796262a34", "shasum": "" }, "require": { @@ -4307,7 +4537,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.0" + "source": "https://github.com/symfony/mime/tree/v6.4.3" }, "funding": [ { @@ -4323,7 +4553,7 @@ "type": "tidelift" } ], - "time": "2023-10-17T11:49:05+00:00" + "time": "2024-01-30T08:32:12+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4827,16 +5057,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { @@ -4844,9 +5074,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4883,7 +5110,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -4899,20 +5126,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -4920,9 +5147,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4966,7 +5190,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -4982,20 +5206,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -5003,9 +5227,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5045,7 +5266,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -5061,7 +5282,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php83", @@ -5145,16 +5366,16 @@ }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "710e27879e9be3395de2b98da3f52a946039f297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/710e27879e9be3395de2b98da3f52a946039f297", + "reference": "710e27879e9be3395de2b98da3f52a946039f297", "shasum": "" }, "require": { @@ -5186,7 +5407,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.4" }, "funding": [ { @@ -5202,20 +5423,20 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2024-02-20T12:31:00+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "3c0a6ea372085754232b502146192c069ae2c5a1" + "reference": "49cfb0223ec64379f7154214dcc1f7c46f3c7a47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/3c0a6ea372085754232b502146192c069ae2c5a1", - "reference": "3c0a6ea372085754232b502146192c069ae2c5a1", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/49cfb0223ec64379f7154214dcc1f7c46f3c7a47", + "reference": "49cfb0223ec64379f7154214dcc1f7c46f3c7a47", "shasum": "" }, "require": { @@ -5257,11 +5478,11 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "PSR HTTP message bridge", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "keywords": [ "http", "http-message", @@ -5269,7 +5490,7 @@ "psr-7" ], "support": { - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.0" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.3" }, "funding": [ { @@ -5285,20 +5506,20 @@ "type": "tidelift" } ], - "time": "2023-10-31T08:40:20+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/routing", - "version": "v6.4.1", + "version": "v6.4.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0c95c164fdba18b12523b75e64199ca3503e6d40" + "reference": "7fe30068e207d9c31c0138501ab40358eb2d49a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0c95c164fdba18b12523b75e64199ca3503e6d40", - "reference": "0c95c164fdba18b12523b75e64199ca3503e6d40", + "url": "https://api.github.com/repos/symfony/routing/zipball/7fe30068e207d9c31c0138501ab40358eb2d49a4", + "reference": "7fe30068e207d9c31c0138501ab40358eb2d49a4", "shasum": "" }, "require": { @@ -5352,7 +5573,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.1" + "source": "https://github.com/symfony/routing/tree/v6.4.5" }, "funding": [ { @@ -5368,20 +5589,20 @@ "type": "tidelift" } ], - "time": "2023-12-01T14:54:37+00:00" + "time": "2024-02-27T12:33:30+00:00" }, { "name": "symfony/serializer", - "version": "v6.4.1", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "7ead272e62c9567df619ef3c49809bf934ddbc1f" + "reference": "88da7f8fe03c5f4c2a69da907f1de03fab2e6872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/7ead272e62c9567df619ef3c49809bf934ddbc1f", - "reference": "7ead272e62c9567df619ef3c49809bf934ddbc1f", + "url": "https://api.github.com/repos/symfony/serializer/zipball/88da7f8fe03c5f4c2a69da907f1de03fab2e6872", + "reference": "88da7f8fe03c5f4c2a69da907f1de03fab2e6872", "shasum": "" }, "require": { @@ -5415,7 +5636,7 @@ "symfony/http-kernel": "^5.4|^6.0|^7.0", "symfony/messenger": "^5.4|^6.0|^7.0", "symfony/mime": "^5.4|^6.0|^7.0", - "symfony/property-access": "^5.4|^6.0|^7.0", + "symfony/property-access": "^5.4.26|^6.3|^7.0", "symfony/property-info": "^5.4.24|^6.2.11|^7.0", "symfony/translation-contracts": "^2.5|^3", "symfony/uid": "^5.4|^6.0|^7.0", @@ -5450,7 +5671,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.4.1" + "source": "https://github.com/symfony/serializer/tree/v6.4.4" }, "funding": [ { @@ -5466,25 +5687,25 @@ "type": "tidelift" } ], - "time": "2023-12-01T14:54:37+00:00" + "time": "2024-02-22T20:27:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -5532,7 +5753,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -5548,20 +5769,20 @@ "type": "tidelift" } ], - "time": "2023-07-30T20:28:31+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", + "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", "shasum": "" }, "require": { @@ -5618,7 +5839,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v6.4.4" }, "funding": [ { @@ -5634,20 +5855,20 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2024-02-01T13:16:41+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5" + "reference": "06450585bf65e978026bda220cdebca3f867fde7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dee0c6e5b4c07ce851b462530088e64b255ac9c5", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7", + "reference": "06450585bf65e978026bda220cdebca3f867fde7", "shasum": "" }, "require": { @@ -5696,7 +5917,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1" }, "funding": [ { @@ -5712,20 +5933,20 @@ "type": "tidelift" } ], - "time": "2023-07-25T15:08:44+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/validator", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "33e1f3bb76ef70e3170e12f878aefb9c69b0fc4c" + "reference": "15fe2c6ed815b06b6b8636d8ba3ef9807ee1a75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/33e1f3bb76ef70e3170e12f878aefb9c69b0fc4c", - "reference": "33e1f3bb76ef70e3170e12f878aefb9c69b0fc4c", + "url": "https://api.github.com/repos/symfony/validator/zipball/15fe2c6ed815b06b6b8636d8ba3ef9807ee1a75c", + "reference": "15fe2c6ed815b06b6b8636d8ba3ef9807ee1a75c", "shasum": "" }, "require": { @@ -5792,7 +6013,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.4.0" + "source": "https://github.com/symfony/validator/tree/v6.4.2" }, "funding": [ { @@ -5808,20 +6029,20 @@ "type": "tidelift" } ], - "time": "2023-11-29T07:47:42+00:00" + "time": "2023-12-29T16:34:12+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.0", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6" + "reference": "b439823f04c98b84d4366c79507e9da6230944b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c40f7d17e91d8b407582ed51a2bbf83c52c367f6", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b439823f04c98b84d4366c79507e9da6230944b1", + "reference": "b439823f04c98b84d4366c79507e9da6230944b1", "shasum": "" }, "require": { @@ -5877,7 +6098,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.0" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.4" }, "funding": [ { @@ -5893,20 +6114,20 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:28:32+00:00" + "time": "2024-02-15T11:23:52+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.4.1", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "2d08ca6b9cc704dce525615d1e6d1788734f36d9" + "reference": "0bd342e24aef49fc82a21bd4eedd3e665d177e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/2d08ca6b9cc704dce525615d1e6d1788734f36d9", - "reference": "2d08ca6b9cc704dce525615d1e6d1788734f36d9", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0bd342e24aef49fc82a21bd4eedd3e665d177e5b", + "reference": "0bd342e24aef49fc82a21bd4eedd3e665d177e5b", "shasum": "" }, "require": { @@ -5952,7 +6173,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.1" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.4" }, "funding": [ { @@ -5968,20 +6189,20 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:32:10+00:00" + "time": "2024-02-26T08:37:45+00:00" }, { "name": "symfony/yaml", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4f9237a1bb42455d609e6687d2613dde5b41a587" + "reference": "d75715985f0f94f978e3a8fa42533e10db921b90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4f9237a1bb42455d609e6687d2613dde5b41a587", - "reference": "4f9237a1bb42455d609e6687d2613dde5b41a587", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d75715985f0f94f978e3a8fa42533e10db921b90", + "reference": "d75715985f0f94f978e3a8fa42533e10db921b90", "shasum": "" }, "require": { @@ -6024,7 +6245,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.0" + "source": "https://github.com/symfony/yaml/tree/v6.4.3" }, "funding": [ { @@ -6040,7 +6261,7 @@ "type": "tidelift" } ], - "time": "2023-11-06T11:00:25+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "twig/twig", @@ -7450,6 +7671,70 @@ }, "time": "2023-10-15T09:55:50+00:00" }, + { + "name": "drupal/config_devel", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/config_devel.git", + "reference": "8.x-1.9" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/config_devel-8.x-1.9.zip", + "reference": "8.x-1.9", + "shasum": "a9cb90575ec854b8d8adb4633a0ddc47c490ca87" + }, + "require": { + "drupal/core": "^9.3 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.9", + "datestamp": "1678264813", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "alexpott", + "homepage": "https://www.drupal.org/user/157725" + }, + { + "name": "benjy", + "homepage": "https://www.drupal.org/user/1852732" + }, + { + "name": "chx", + "homepage": "https://www.drupal.org/user/9446" + }, + { + "name": "joachim", + "homepage": "https://www.drupal.org/user/107701" + }, + { + "name": "nedjo", + "homepage": "https://www.drupal.org/user/4481" + }, + { + "name": "vijaycs85", + "homepage": "https://www.drupal.org/user/93488" + } + ], + "description": "Helps developers work with configuration.", + "homepage": "https://www.drupal.org/project/config_devel", + "support": { + "source": "https://git.drupalcode.org/project/config_devel" + } + }, { "name": "drupal/core-dev", "version": "10.2.0", @@ -9454,21 +9739,21 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.3", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", "phpstan/phpdoc-parser": "^1.13" }, @@ -9506,9 +9791,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2024-02-23T11:10:43+00:00" }, { "name": "phpmd/phpmd", @@ -9760,16 +10045,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.5", + "version": "1.27.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc" + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fedf211ff14ec8381c9bf5714e33a7a552dd1acc", - "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/86e4d5a4b036f8f0be1464522f4c6b584c452757", + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757", "shasum": "" }, "require": { @@ -9801,9 +10086,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.5" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.27.0" }, - "time": "2023-12-16T09:33:33+00:00" + "time": "2024-03-21T13:14:53+00:00" }, { "name": "phpstan/phpstan", @@ -12344,16 +12629,16 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", "shasum": "" }, "require": { @@ -12361,9 +12646,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -12403,7 +12685,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" }, "funding": [ { @@ -12419,7 +12701,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php82", @@ -12706,7 +12988,9 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "drupal/default_content": 15 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/docker-compose.yml b/docker-compose.yml index 4571a29..0721efb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,8 @@ version: '2' services: web: - image: fpfis/httpd-php:8.1-dev + image: fpfis/httpd-php-dev:8.1 +# image: fpfis/httpd-php:8.1-ci working_dir: ${PWD} ports: - "8080:8080" @@ -20,18 +21,30 @@ services: # XDEBUG CONFIGURATION. XDEBUG_CONFIG: remote_host=host.docker.internal remote_port=9003 remote_enable=1 PHP_IDE_CONFIG: "serverName=Docker" + DRUPAL_FLUSH_CREDS: "flush:test" + DRUPAL_SITE_NAME: "ddd" + DRUPAL_ENVIRONMENT: "local" + DRUPAL_DATABASE_USERNAME: root + DRUPAL_DATABASE_PASSWORD: + DRUPAL_DATABASE_PREFIX: + DRUPAL_DATABASE_NAME: tdd + DRUPAL_DATABASE_HOST: mysql + DRUPAL_DATABASE_PORT: 3306 + DRUPAL_ACCOUNT_USERNAME: admin + DRUPAL_ACCOUNT_PASSWORD: admin + DRUPAL_ACCOUNT_EMAIL: abel.santos-corral@ext.ec.europa.eu + DRUPAL_BASE_URL: http://web:8080/web + VIRTUAL_HOST: http://web:8080/web + DRUSH_OPTIONS_URI: http://web:8080/web # For Xdebug setup, run this command in the terminal: # For Mac users: sudo ifconfig en0 alias 10.254.254.254 255.255.255.0 # For Linux users: sudo ip addr add 10.254.254.254/32 dev lo label lo:1 - env_file: - - .env mysql: - image: percona/percona-server:8.0 + image: percona/percona-server:5.7 + command: --innodb-log-file_size=2G --max-allowed-packet=1G --innodb-buffer-pool-size=512M --wait-timeout=31536000 environment: MYSQL_ALLOW_EMPTY_PASSWORD: "yes" - volumes: - - mysql:/var/lib/mysql selenium: image: selenium/standalone-chrome:4.1.3-20220405 diff --git a/lib/modules/ddd_default_content/README.md b/lib/modules/ddd_default_content/README.md new file mode 100644 index 0000000..5fcf26b --- /dev/null +++ b/lib/modules/ddd_default_content/README.md @@ -0,0 +1,3 @@ +# DDD default content + +Provide default content to aid in showcasing DDD features. diff --git a/lib/modules/ddd_default_content/content/menu_link_content/e4720345-d30b-4c16-89d5-9b2e73cee015.yml b/lib/modules/ddd_default_content/content/menu_link_content/e4720345-d30b-4c16-89d5-9b2e73cee015.yml new file mode 100644 index 0000000..cf713b6 --- /dev/null +++ b/lib/modules/ddd_default_content/content/menu_link_content/e4720345-d30b-4c16-89d5-9b2e73cee015.yml @@ -0,0 +1,39 @@ +_meta: + version: '1.0' + entity_type: menu_link_content + uuid: e4720345-d30b-4c16-89d5-9b2e73cee015 + bundle: menu_link_content + default_langcode: en +default: + enabled: + - + value: true + title: + - + value: 'DDD Views' + description: + - + value: 'Expose all view pages for DDD views.' + menu_name: + - + value: main + link: + - + uri: 'route:' + title: '' + options: { } + external: + - + value: false + rediscover: + - + value: false + weight: + - + value: 5 + expanded: + - + value: true + revision_translation_affected: + - + value: true diff --git a/lib/modules/ddd_default_content/ddd_default_content.info.yml b/lib/modules/ddd_default_content/ddd_default_content.info.yml new file mode 100644 index 0000000..f22337d --- /dev/null +++ b/lib/modules/ddd_default_content/ddd_default_content.info.yml @@ -0,0 +1,12 @@ +name: DDD Default Content +type: module +description: Provide default content for showcasing. +package: 'ddd' +core_version_requirement: ^10 +dependencies: + - default_content:default_content + +default_content: + menu_link_content: + # DDD Pages + - e4720345-d30b-4c16-89d5-9b2e73cee015 diff --git a/lib/modules/ddd_views/README.md b/lib/modules/ddd_views/README.md new file mode 100644 index 0000000..3f7c3ce --- /dev/null +++ b/lib/modules/ddd_views/README.md @@ -0,0 +1,66 @@ +# DDD Views + +Module aimed to test views examples from Drupalize.me or other sites. + +## Custom Views Sort Plugin + +This is coming from link [Define a Custom Views Sort Plugin](https://drupalize.me/tutorial/define-custom-views-sort-plugin) + +### Config + +This is configured in view Test content. The sort is done by sort plugin called Natural title sort. + +### Code + +The code is found in src > Plugin > views > sort. Class TitleSort.php. + +### Test it + +Create several nodes of type Test views. Use prefixes: 'a', 'an', 'the' in the the title. + +The sorting will discard those words when sorting. + +## Custom Views Pseudo Field Plugin + +This is coming from link [Define a Custom Views Pseudo Field Plugin](https://drupalize.me/tutorial/define-custom-views-pseudo-field-plugin) + +### Config + +This is configured in view Test content. The added is the full time calculated from two fields of the view. + +### Code + +The code is found in src > Plugin > views > field. Class FullTime.php. + +### Test it + +Create two nodes of type Test views. Add preparation and cook time (in minutes) + +When going to the view, the field will be shown calculated. + +## Expose a Custom Database Table to Views + +This is coming from link [Expose a Custom Database Table to Views](https://drupalize.me/tutorial/expose-custom-database-table-views) + +### Config + +Enable module ddd_news. + +This is configured in view _DDD - News - News subscriptions_. Check phpmyadmin to see the table and fields. + +### Code + +The code is found in module ddd_news. + +### Test it + +Add several records at the table to populate it. Use template: + +``` +INSERT INTO news_subs (first_name, last_name, email, created, is_active) VALUES ('John', 'Doe', 'john.doe@example.com', UNIX_TIMESTAMP(), 1); +INSERT INTO news_subs (first_name, last_name, email, created, is_active) VALUES ('Jane', 'Doe', 'jane.doe@example.com', UNIX_TIMESTAMP(), 1); +INSERT INTO ddd_news_subs (first_name, last_name, email, created, is_active) VALUES ('Justa', 'Fish', 'jfish@example.com', UNIX_TIMESTAMP(), 0); + +``` + +When going to the view, the data of news subscribers will be shown. diff --git a/lib/modules/ddd_views/config/install/core.base_field_override.node.ddd_test_views.promote.yml b/lib/modules/ddd_views/config/install/core.base_field_override.node.ddd_test_views.promote.yml new file mode 100644 index 0000000..de204bb --- /dev/null +++ b/lib/modules/ddd_views/config/install/core.base_field_override.node.ddd_test_views.promote.yml @@ -0,0 +1,21 @@ +langcode: en +status: true +dependencies: + config: + - node.type.ddd_test_views +id: node.ddd_test_views.promote +field_name: promote +entity_type: node +bundle: ddd_test_views +label: 'Promoted to front page' +description: '' +required: false +translatable: true +default_value: + - + value: 0 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/lib/modules/ddd_views/config/install/core.entity_form_display.node.ddd_test_views.default.yml b/lib/modules/ddd_views/config/install/core.entity_form_display.node.ddd_test_views.default.yml new file mode 100644 index 0000000..7c1ecdd --- /dev/null +++ b/lib/modules/ddd_views/config/install/core.entity_form_display.node.ddd_test_views.default.yml @@ -0,0 +1,92 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.ddd_test_views.body + - field.field.node.ddd_test_views.field_cook_time + - field.field.node.ddd_test_views.field_prep_time + - node.type.ddd_test_views + module: + - path + - text +id: node.ddd_test_views.default +targetEntityType: node +bundle: ddd_test_views +mode: default +content: + body: + type: text_textarea_with_summary + weight: 1 + region: content + settings: + rows: 9 + summary_rows: 3 + placeholder: '' + show_summary: false + third_party_settings: { } + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_cook_time: + type: number + weight: 26 + region: content + settings: + placeholder: '' + third_party_settings: { } + field_prep_time: + type: number + weight: 27 + region: content + settings: + placeholder: '' + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + weight: 4 + region: content + settings: + display_label: true + third_party_settings: { } + status: + type: boolean_checkbox + weight: 7 + region: content + settings: + display_label: true + third_party_settings: { } + sticky: + type: boolean_checkbox + weight: 5 + region: content + settings: + display_label: true + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } +hidden: { } diff --git a/lib/modules/ddd_views/config/install/core.entity_view_display.node.ddd_test_views.default.yml b/lib/modules/ddd_views/config/install/core.entity_view_display.node.ddd_test_views.default.yml new file mode 100644 index 0000000..204895c --- /dev/null +++ b/lib/modules/ddd_views/config/install/core.entity_view_display.node.ddd_test_views.default.yml @@ -0,0 +1,47 @@ +langcode: en +status: true +dependencies: + config: + - field.field.node.ddd_test_views.body + - field.field.node.ddd_test_views.field_cook_time + - field.field.node.ddd_test_views.field_prep_time + - node.type.ddd_test_views + module: + - text + - user +id: node.ddd_test_views.default +targetEntityType: node +bundle: ddd_test_views +mode: default +content: + body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 101 + region: content + field_cook_time: + type: number_integer + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + weight: 102 + region: content + field_prep_time: + type: number_integer + label: above + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + weight: 103 + region: content + links: + settings: { } + third_party_settings: { } + weight: 100 + region: content +hidden: { } diff --git a/lib/modules/ddd_views/config/install/core.entity_view_display.node.ddd_test_views.teaser.yml b/lib/modules/ddd_views/config/install/core.entity_view_display.node.ddd_test_views.teaser.yml new file mode 100644 index 0000000..543b6f1 --- /dev/null +++ b/lib/modules/ddd_views/config/install/core.entity_view_display.node.ddd_test_views.teaser.yml @@ -0,0 +1,33 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.ddd_test_views.body + - field.field.node.ddd_test_views.field_cook_time + - field.field.node.ddd_test_views.field_prep_time + - node.type.ddd_test_views + module: + - text + - user +id: node.ddd_test_views.teaser +targetEntityType: node +bundle: ddd_test_views +mode: teaser +content: + body: + type: text_summary_or_trimmed + label: hidden + settings: + trim_length: 600 + third_party_settings: { } + weight: 0 + region: content + links: + settings: { } + third_party_settings: { } + weight: 1 + region: content +hidden: + field_cook_time: true + field_prep_time: true diff --git a/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.body.yml b/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.body.yml new file mode 100644 index 0000000..841ad18 --- /dev/null +++ b/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.body.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.body + - node.type.ddd_test_views + module: + - text +id: node.ddd_test_views.body +field_name: body +entity_type: node +bundle: ddd_test_views +label: Body +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + display_summary: true + required_summary: false + allowed_formats: { } +field_type: text_with_summary diff --git a/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.field_cook_time.yml b/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.field_cook_time.yml new file mode 100644 index 0000000..6fcbd35 --- /dev/null +++ b/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.field_cook_time.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_cook_time + - node.type.ddd_test_views +id: node.ddd_test_views.field_cook_time +field_name: field_cook_time +entity_type: node +bundle: ddd_test_views +label: 'Cook time' +description: '' +required: false +translatable: false +default_value: + - + value: 0 +default_value_callback: '' +settings: + min: 0 + max: 200 + prefix: '' + suffix: minutes +field_type: integer diff --git a/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.field_prep_time.yml b/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.field_prep_time.yml new file mode 100644 index 0000000..5b0f548 --- /dev/null +++ b/lib/modules/ddd_views/config/install/field.field.node.ddd_test_views.field_prep_time.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_prep_time + - node.type.ddd_test_views +id: node.ddd_test_views.field_prep_time +field_name: field_prep_time +entity_type: node +bundle: ddd_test_views +label: 'Prep time' +description: '' +required: false +translatable: false +default_value: + - + value: 0 +default_value_callback: '' +settings: + min: 0 + max: 200 + prefix: '' + suffix: minutes +field_type: integer diff --git a/lib/modules/ddd_views/config/install/field.storage.node.field_cook_time.yml b/lib/modules/ddd_views/config/install/field.storage.node.field_cook_time.yml new file mode 100644 index 0000000..e3bd30e --- /dev/null +++ b/lib/modules/ddd_views/config/install/field.storage.node.field_cook_time.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - node +id: node.field_cook_time +field_name: field_cook_time +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/lib/modules/ddd_views/config/install/field.storage.node.field_prep_time.yml b/lib/modules/ddd_views/config/install/field.storage.node.field_prep_time.yml new file mode 100644 index 0000000..2ca4f9e --- /dev/null +++ b/lib/modules/ddd_views/config/install/field.storage.node.field_prep_time.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - node +id: node.field_prep_time +field_name: field_prep_time +entity_type: node +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/lib/modules/ddd_views/config/install/node.type.ddd_test_views.yml b/lib/modules/ddd_views/config/install/node.type.ddd_test_views.yml new file mode 100644 index 0000000..29a5a24 --- /dev/null +++ b/lib/modules/ddd_views/config/install/node.type.ddd_test_views.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: 'Test Views' +type: ddd_test_views +description: 'This content type will be used mainly for testing all stuff at ddd_views module.' +help: '' +new_revision: false +preview_mode: 0 +display_submitted: false diff --git a/lib/modules/ddd_views/config/install/views.view.ddd_test_content.yml b/lib/modules/ddd_views/config/install/views.view.ddd_test_content.yml new file mode 100644 index 0000000..ed04efe --- /dev/null +++ b/lib/modules/ddd_views/config/install/views.view.ddd_test_content.yml @@ -0,0 +1,542 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.ddd_test_views + - system.menu.main + module: + - ddd_views + - node + - user +id: ddd_test_content +label: 'DDD - Views - Test Content' +module: views +description: 'Custom Views Sort Plugin' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'DDD - Views - Test Content' + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + full_time: + id: full_time + table: node + field: full_time + entity_type: node + plugin_id: full_time + pager: + type: mini + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: "There's no content at the moment. Please visit Content and add new nodes to populate this view." + format: basic_html + tokenize: false + sorts: + natural_title_sort: + id: natural_title_sort + table: node_field_data + field: natural_title_sort + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: natural_title_sort + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + arguments: { } + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + type: + id: type + table: node_field_data + field: type + entity_type: node + entity_field: type + plugin_id: bundle + value: + ddd_test_views: ddd_test_views + style: + type: default + row: + type: 'entity:node' + options: + relationship: none + view_mode: teaser + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + id: page_1 + display_title: 'Page - Sort' + display_plugin: page + position: 1 + display_options: + display_description: '' + display_extenders: { } + path: test-content-sort + menu: + type: normal + title: Sorting + description: 'Views to showcase the sorting of a custom views sort plugin' + weight: -5 + expanded: true + menu_name: main + parent: 'menu_link_content:e4720345-d30b-4c16-89d5-9b2e73cee015' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_2: + id: page_2 + display_title: 'Page - Field' + display_plugin: page + position: 1 + display_options: + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: created + plugin_id: field + label: Created + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: html_date + custom_date_format: '' + timezone: Europe/Madrid + tooltip: + date_format: long + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + description: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + changed: + id: changed + table: node_field_data + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: field + label: Changed + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: html_date + custom_date_format: '' + timezone: Europe/Madrid + tooltip: + date_format: long + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + description: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + full_time: + id: full_time + table: node + field: full_time + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: full_time + label: 'Full cook and prep time' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + title: title + full_time: full_time + default: '-1' + info: + title: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + full_time: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + defaults: + style: false + row: false + fields: false + display_description: 'Custom Views Pseudo Field Plugin' + display_extenders: { } + path: test-content-fields + menu: + type: normal + title: 'Pseudo field' + description: 'Views to showcase the pseudo field plugin' + weight: -10 + expanded: true + menu_name: main + parent: 'menu_link_content:e4720345-d30b-4c16-89d5-9b2e73cee015' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/lib/modules/ddd_views/ddd_views.info.yml b/lib/modules/ddd_views/ddd_views.info.yml new file mode 100644 index 0000000..4dac36c --- /dev/null +++ b/lib/modules/ddd_views/ddd_views.info.yml @@ -0,0 +1,21 @@ +name: 'DDD Views feature' +type: module +description: 'Provides custom functional examples of DDD Views feature.' +core_version_requirement: ^10 +package: 'ddd' +dependencies: + - drupal:views + +config_devel: + install: + - core.base_field_override.node.ddd_test_views.promote + - core.entity_form_display.node.ddd_test_views.default + - core.entity_view_display.node.ddd_test_views.default + - core.entity_view_display.node.ddd_test_views.teaser + - field.field.node.ddd_test_views.body + - field.field.node.ddd_test_views.field_prep_time + - field.field.node.ddd_test_views.field_cook_time + - field.storage.node.field_prep_time + - field.storage.node.field_cook_time + - node.type.ddd_test_views + - views.view.ddd_test_content diff --git a/lib/modules/ddd_views/ddd_views.module b/lib/modules/ddd_views/ddd_views.module new file mode 100644 index 0000000..8695fc8 --- /dev/null +++ b/lib/modules/ddd_views/ddd_views.module @@ -0,0 +1,37 @@ + t('Natural title sort'), + 'group' => t('Content'), + 'help' => t('Sort titles naturally'), + 'sort' => [ + 'field' => 'title', + 'id' => 'natural_title_sort', + ], + ]; + + // This 'full_time' field is a pseudo field and doesn't correspond with any + // specific database table. Instead, its data is computed by adding together + // the values of the `field_cook_time` and `field_prep_time` fields on the + // 'recipe' content type. + // @see \Drupal\recipe\Plugin\views\field\FullTime. + $data['node']['full_time'] = [ + 'title' => t('Full cook and prep time'), + 'field' => [ + 'title' => t('Full cook and prep time'), + 'help' => t('Total value of cook and prep time. Appears on Recipe nodes only.'), + 'id' => 'full_time', + ], + ]; +} diff --git a/lib/modules/ddd_views/modules/ddd_header_link/config/install/views.view.ddd_articles_area.yml b/lib/modules/ddd_views/modules/ddd_header_link/config/install/views.view.ddd_articles_area.yml new file mode 100644 index 0000000..4fc4849 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_header_link/config/install/views.view.ddd_articles_area.yml @@ -0,0 +1,226 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.article + - system.menu.main + module: + - ddd_header_link + - node + - user +id: ddd_articles_area +label: 'DDD - Articles - Area' +module: views +description: 'Custom Views Area Handler Plugin' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'DDD - Articles - Area' + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: mini + options: + offset: 0 + items_per_page: 5 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: 'There is no content of type Article at the moment. Please create some...' + format: basic_html + tokenize: false + sorts: + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: created + plugin_id: date + order: DESC + expose: + label: '' + field_identifier: '' + exposed: false + granularity: second + arguments: { } + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + type: + id: type + table: node_field_data + field: type + entity_type: node + entity_field: type + plugin_id: bundle + value: + article: article + style: + type: default + row: + type: 'entity:node' + options: + view_mode: teaser + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: + ddd_header_link: + id: ddd_header_link + table: views + field: ddd_header_link + relationship: none + group_type: group + admin_label: '' + plugin_id: ddd_header_link + empty: false + link_text: 'Back >' + link_url: '' + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_ddd_articles_area: + id: page_ddd_articles_area + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: ddd-articles-area + menu: + type: normal + title: 'Custom area' + description: 'Provides a custom views area handler plugin' + weight: -20 + expanded: true + menu_name: main + parent: 'menu_link_content:e4720345-d30b-4c16-89d5-9b2e73cee015' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/lib/modules/ddd_views/modules/ddd_header_link/ddd_header_link.info.yml b/lib/modules/ddd_views/modules/ddd_header_link/ddd_header_link.info.yml new file mode 100644 index 0000000..febcfec --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_header_link/ddd_header_link.info.yml @@ -0,0 +1,12 @@ +name: 'DDD Views Header Link' +type: module +description: 'Provides custom area header link handler of DDD Views feature.' +core: 8.x +core_version_requirement: ^10 +package: 'ddd' +dependencies: + - drupal:views + +config_devel: + install: + - views.view.ddd_articles_area diff --git a/lib/modules/ddd_views/modules/ddd_header_link/ddd_header_link.module b/lib/modules/ddd_views/modules/ddd_header_link/ddd_header_link.module new file mode 100644 index 0000000..41d6484 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_header_link/ddd_header_link.module @@ -0,0 +1,22 @@ + t('Header Link'), + 'help' => t('Provides header link'), + 'area' => [ + 'id' => 'ddd_header_link', + ], + ]; + return $data; +} diff --git a/lib/modules/ddd_views/modules/ddd_header_link/src/Plugin/views/area/HeaderLink.php b/lib/modules/ddd_views/modules/ddd_header_link/src/Plugin/views/area/HeaderLink.php new file mode 100644 index 0000000..bb390a2 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_header_link/src/Plugin/views/area/HeaderLink.php @@ -0,0 +1,81 @@ +'; + $options['link_url']['default'] = ''; + return $options; + } + + /** + * {@inheritdoc} + */ + public function buildOptionsForm(&$form, FormStateInterface $form_state) { + parent::buildOptionsForm($form, $form_state); + $form['link_text'] = [ + '#type' => 'textfield', + '#title' => $this->t('Link text'), + '#size' => 60, + '#default_value' => $this->options['link_text'], + '#maxlength' => 128, + ]; + $form['link_url'] = [ + '#type' => 'textfield', + '#title' => $this->t('Link URL'), + '#default_value' => $this->options['link_url'], + '#size' => 60, + '#maxlength' => 128, + ]; + } + + /** + * {@inheritdoc} + */ + public function render($empty = FALSE) { + if ((!$empty || !empty($this->options['empty'])) && !empty($this->options['link_url'])) { + // Prepare text. + if (!empty($this->options['link_text'])) { + $text = $this->t($this->options['link_text']); + } + else { + $text = $this->t('Back >'); + } + // Prepare url. + if (strpos($this->options['link_url'], 'http') !== FALSE) { + $url = Url::fromUri($this->options['link_url']); + } + elseif (isset($url_opt) && strpos($url_opt, '/') === 0) { + $url = Url::fromUserInput($this->options['link_url']); + } + else { + $url = Url::fromUserInput('/' . $this->options['link_url']); + } + // Setup item and return it. + $item = [ + '#type' => 'link', + '#title' => $text, + '#url' => $url, + ]; + return $item; + } + } + +} diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/block.block.olivero_views_block__ddd_articles_access.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/block.block.olivero_views_block__ddd_articles_access.yml new file mode 100644 index 0000000..cb2fc46 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/block.block.olivero_views_block__ddd_articles_access.yml @@ -0,0 +1,28 @@ +langcode: en +status: true +dependencies: + config: + - views.view.ddd_articles_access + module: + - system + - views + theme: + - olivero +id: olivero_views_block__ddd_articles_access +theme: olivero +region: content_below +weight: 0 +provider: null +plugin: 'views_block:ddd_articles_access-block_ddd_articles_access' +settings: + id: 'views_block:ddd_articles_access-block_ddd_articles_access' + label: '' + label_display: visible + provider: views + views_label: '' + items_per_page: none +visibility: + request_path: + id: request_path + negate: false + pages: '' diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_form_display.user.user.default.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_form_display.user.user.default.yml new file mode 100644 index 0000000..21dbc27 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_form_display.user.user.default.yml @@ -0,0 +1,51 @@ +langcode: en +status: true +dependencies: + config: + - field.field.user.user.field_resident_editor + - field.field.user.user.user_picture + - image.style.thumbnail + module: + - image + - user +id: user.user.default +targetEntityType: user +bundle: user +mode: default +content: + account: + weight: 0 + region: content + settings: { } + third_party_settings: { } + contact: + weight: 4 + region: content + settings: { } + third_party_settings: { } + field_resident_editor: + type: boolean_checkbox + weight: 2 + region: content + settings: + display_label: true + third_party_settings: { } + language: + weight: 3 + region: content + settings: { } + third_party_settings: { } + timezone: + weight: 5 + region: content + settings: { } + third_party_settings: { } + user_picture: + type: image_image + weight: 1 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } +hidden: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_view_display.user.user.compact.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_view_display.user.user.compact.yml new file mode 100644 index 0000000..e30e8fa --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_view_display.user.user.compact.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.user.compact + - field.field.user.user.field_resident_editor + - field.field.user.user.user_picture + - image.style.thumbnail + module: + - image + - user +id: user.user.compact +targetEntityType: user +bundle: user +mode: compact +content: + user_picture: + type: image + label: hidden + settings: + image_link: content + image_style: thumbnail + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content +hidden: + field_resident_editor: true + member_for: true diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_view_display.user.user.default.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_view_display.user.user.default.yml new file mode 100644 index 0000000..f34b472 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/core.entity_view_display.user.user.default.yml @@ -0,0 +1,42 @@ +langcode: en +status: true +dependencies: + config: + - field.field.user.user.field_resident_editor + - field.field.user.user.user_picture + - image.style.thumbnail + module: + - image + - user +id: user.user.default +targetEntityType: user +bundle: user +mode: default +content: + field_resident_editor: + type: boolean + label: inline + settings: + format: unicode-yes-no + format_custom_false: '' + format_custom_true: '' + third_party_settings: { } + weight: 1 + region: content + member_for: + settings: { } + third_party_settings: { } + weight: 2 + region: content + user_picture: + type: image + label: hidden + settings: + image_link: content + image_style: thumbnail + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content +hidden: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/field.field.user.user.field_resident_editor.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/field.field.user.user.field_resident_editor.yml new file mode 100644 index 0000000..c06b198 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/field.field.user.user.field_resident_editor.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.user.field_resident_editor + module: + - user +id: user.user.field_resident_editor +field_name: field_resident_editor +entity_type: user +bundle: user +label: 'Resident editor' +description: '' +required: false +translatable: false +default_value: + - + value: 0 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/field.storage.user.field_resident_editor.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/field.storage.user.field_resident_editor.yml new file mode 100644 index 0000000..4fa8fab --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/field.storage.user.field_resident_editor.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - user +id: user.field_resident_editor +field_name: field_resident_editor +entity_type: user +type: boolean +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_articles_access.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_articles_access.yml new file mode 100644 index 0000000..1c53128 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_articles_access.yml @@ -0,0 +1,219 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.article + module: + - ddd_news + - node +id: ddd_articles_access +label: 'DDD - Articles - Access' +module: views +description: 'Custom Views Access Plugin' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'DDD - Articles - Access' + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: some + options: + offset: 0 + items_per_page: 5 + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: ResidentEditorAccess + options: { } + cache: + type: tag + options: { } + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: "There's no Article content at the moment. Please create some..." + format: basic_html + tokenize: false + sorts: + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: created + plugin_id: date + order: DESC + expose: + label: '' + field_identifier: '' + exposed: false + granularity: second + arguments: { } + filters: + status: + id: status + table: node_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: status + plugin_id: boolean + operator: '=' + value: '0' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + type: + id: type + table: node_field_data + field: type + entity_type: node + entity_field: type + plugin_id: bundle + value: + article: article + style: + type: accordion + options: + row_class: abelius + default_row_class: true + uses_fields: false + summary_text: Article + row: + type: 'entity:node' + options: + view_mode: teaser + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + tags: { } + block_ddd_articles_access: + id: block_ddd_articles_access + display_title: Block + display_plugin: block + position: 1 + display_options: + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + tags: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_news_news_subscriptions.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_news_news_subscriptions.yml new file mode 100644 index 0000000..ad5ef58 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_news_news_subscriptions.yml @@ -0,0 +1,408 @@ +langcode: en +status: true +dependencies: + config: + - system.menu.main + module: + - ddd_news +id: ddd_news_news_subscriptions +label: 'DDD - News - News subscriptions' +module: views +description: 'Expose a Custom Database Table to Views' +tag: '' +base_table: ddd_news_subs +base_field: email +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'DDD - News - News subscribres' + fields: + first_name: + id: first_name + table: ddd_news_subs + field: first_name + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + label: 'First name' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + last_name: + id: last_name + table: ddd_news_subs + field: last_name + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + label: 'Last name' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + email: + id: email + table: ddd_news_subs + field: email + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: null + plugin_id: standard + label: Email + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + is_active: + id: is_active + table: ddd_news_subs + field: is_active + relationship: none + group_type: group + admin_label: '' + plugin_id: boolean + label: 'Is Active?' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + type: yes-no + type_custom_true: '' + type_custom_false: '' + not: false + created: + id: created + table: ddd_news_subs + field: created + relationship: none + group_type: group + admin_label: '' + plugin_id: date + label: Created + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + date_format: short + custom_date_format: '' + timezone: '' + pager: + type: mini + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: none + options: { } + cache: + type: tag + options: { } + empty: { } + sorts: { } + arguments: { } + filters: + created: + id: created + table: ddd_news_subs + field: created + relationship: none + group_type: group + admin_label: '' + plugin_id: ddd_relative_date_filter + operator: '=' + value: + relative_date: last_month + group: 1 + exposed: true + expose: + operator_id: '' + label: 'Subscription length' + description: '' + use_operator: false + operator: created_op + operator_limit_selection: false + operator_list: { } + identifier: created + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + content_editor: '0' + administrator: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: AND + style: + type: table + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + - url.query_args + tags: { } + page_ddd_news_news_subscriptions: + id: page_ddd_news_news_subscriptions + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: ddd---news---news-subscriptions + menu: + type: normal + title: 'Views - Expose custom table' + description: 'View to showcase the exposure of a custom table.' + weight: -15 + expanded: true + menu_name: main + parent: 'menu_link_content:e4720345-d30b-4c16-89d5-9b2e73cee015' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + - url.query_args + tags: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_people.yml b/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_people.yml new file mode 100644 index 0000000..9271a06 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/install/views.view.ddd_people.yml @@ -0,0 +1,1075 @@ +langcode: en +status: true +dependencies: + config: + - system.menu.main + module: + - ddd_news + - user +id: ddd_people +label: 'DDD - People' +module: user +description: 'Find and manage people interacting with your site.' +tag: default +base_table: users_field_data +base_field: uid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: People + fields: + user_bulk_form: + id: user_bulk_form + table: users + field: user_bulk_form + relationship: none + group_type: group + admin_label: '' + entity_type: user + plugin_id: user_bulk_form + label: 'Bulk update' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + name: + id: name + table: users_field_data + field: name + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: name + plugin_id: field + label: Username + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + type: user_name + first_name: + id: first_name + table: ddd_news_subs + field: first_name + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + label: 'First name' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + last_name: + id: last_name + table: ddd_news_subs + field: last_name + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + label: 'Last name' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + email: + id: email + table: ddd_news_subs + field: email + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + label: 'Subscriber?' + exclude: false + alter: + alter_text: true + text: 'Yes' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: 'No' + hide_empty: false + empty_zero: false + hide_alter_empty: true + status: + id: status + table: users_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: status + plugin_id: field + label: Status + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + type: boolean + settings: + format: custom + format_custom_false: Blocked + format_custom_true: Active + roles_target_id: + id: roles_target_id + table: user__roles + field: roles_target_id + relationship: none + group_type: group + admin_label: '' + plugin_id: user_roles + label: Roles + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + type: ul + separator: ', ' + created: + id: created + table: users_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: created + plugin_id: field + label: 'Member for' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + type: timestamp_ago + settings: + future_format: '@interval' + past_format: '@interval' + granularity: 2 + access: + id: access + table: users_field_data + field: access + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: access + plugin_id: field + label: 'Last access' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + type: timestamp_ago + settings: + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + operations: + id: operations + table: users + field: operations + relationship: none + group_type: group + admin_label: '' + entity_type: user + plugin_id: entity_operations + label: Operations + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: true + mail: + id: mail + table: users_field_data + field: mail + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: mail + plugin_id: field + label: '' + exclude: true + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: basic_string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: full + options: + offset: 0 + items_per_page: 50 + total_pages: 0 + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + quantity: 9 + exposed_form: + type: basic + options: + submit_button: Filter + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'administer users' + cache: + type: tag + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + plugin_id: text_custom + empty: true + content: 'No people available.' + tokenize: false + sorts: + created: + id: created + table: users_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: created + plugin_id: date + order: DESC + expose: + label: '' + field_identifier: created + exposed: false + granularity: second + filters: + combine: + id: combine + table: views + field: combine + relationship: none + group_type: group + admin_label: '' + plugin_id: combine + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: combine_op + label: 'Name or email contains' + description: '' + use_operator: false + operator: combine_op + operator_limit_selection: false + operator_list: { } + identifier: user + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + fields: + name: name + mail: mail + status: + id: status + table: users_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: status + plugin_id: boolean + operator: '=' + value: '1' + group: 1 + exposed: true + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: status_op + operator_limit_selection: false + operator_list: { } + identifier: status + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + is_grouped: true + group_info: + label: Status + description: '' + identifier: status + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: + 1: + title: Active + operator: '=' + value: '1' + 2: + title: Blocked + operator: '=' + value: '0' + roles_target_id: + id: roles_target_id + table: user__roles + field: roles_target_id + relationship: none + group_type: group + admin_label: '' + plugin_id: user_roles + operator: or + value: { } + group: 1 + exposed: true + expose: + operator_id: roles_target_id_op + label: Role + description: '' + use_operator: false + operator: roles_target_id_op + operator_limit_selection: false + operator_list: { } + identifier: role + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + permission: + id: permission + table: user__roles + field: permission + relationship: none + group_type: group + admin_label: '' + plugin_id: user_permissions + operator: or + value: { } + group: 1 + exposed: true + expose: + operator_id: permission_op + label: Permission + description: '' + use_operator: false + operator: permission_op + operator_limit_selection: false + operator_list: { } + identifier: permission + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + default_langcode: + id: default_langcode + table: users_field_data + field: default_langcode + relationship: none + group_type: group + admin_label: '' + entity_type: user + entity_field: default_langcode + plugin_id: boolean + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + uid_raw: + id: uid_raw + table: users_field_data + field: uid_raw + relationship: none + group_type: group + admin_label: '' + entity_type: user + plugin_id: numeric + operator: '!=' + value: + min: '' + max: '' + value: '0' + group: 1 + exposed: false + expose: + operator_id: '0' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: AND + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + user_bulk_form: user_bulk_form + name: name + status: status + rid: rid + created: created + access: access + edit_node: edit_node + dropbutton: dropbutton + default: created + info: + user_bulk_form: + align: '' + separator: '' + empty_column: false + responsive: '' + name: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + status: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: priority-low + rid: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: priority-low + created: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: priority-low + access: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: priority-low + edit_node: + align: '' + separator: '' + empty_column: false + responsive: priority-low + dropbutton: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: true + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + css_class: '' + use_ajax: false + group_by: false + show_admin_links: true + use_more: false + use_more_always: false + use_more_text: more + link_display: page_1 + link_url: '' + display_comment: '' + hide_attachment_summary: false + display_extenders: { } + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - user.permissions + tags: { } + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + defaults: + show_admin_links: false + show_admin_links: false + display_extenders: { } + path: admin/people/ddd-list + menu: + type: normal + title: 'User List' + description: 'Find and manage people interacting with your site.' + weight: 20 + expanded: false + menu_name: main + parent: 'menu_link_content:e4720345-d30b-4c16-89d5-9b2e73cee015' + context: '0' + tab_options: + type: normal + title: 'DDD - People' + description: 'Manage user accounts, roles, and permissions.' + weight: 0 + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - user.permissions + tags: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_form_display.user.user.default.yml b/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_form_display.user.user.default.yml new file mode 100644 index 0000000..21dbc27 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_form_display.user.user.default.yml @@ -0,0 +1,51 @@ +langcode: en +status: true +dependencies: + config: + - field.field.user.user.field_resident_editor + - field.field.user.user.user_picture + - image.style.thumbnail + module: + - image + - user +id: user.user.default +targetEntityType: user +bundle: user +mode: default +content: + account: + weight: 0 + region: content + settings: { } + third_party_settings: { } + contact: + weight: 4 + region: content + settings: { } + third_party_settings: { } + field_resident_editor: + type: boolean_checkbox + weight: 2 + region: content + settings: + display_label: true + third_party_settings: { } + language: + weight: 3 + region: content + settings: { } + third_party_settings: { } + timezone: + weight: 5 + region: content + settings: { } + third_party_settings: { } + user_picture: + type: image_image + weight: 1 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } +hidden: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_view_display.user.user.compact.yml b/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_view_display.user.user.compact.yml new file mode 100644 index 0000000..e30e8fa --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_view_display.user.user.compact.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.user.compact + - field.field.user.user.field_resident_editor + - field.field.user.user.user_picture + - image.style.thumbnail + module: + - image + - user +id: user.user.compact +targetEntityType: user +bundle: user +mode: compact +content: + user_picture: + type: image + label: hidden + settings: + image_link: content + image_style: thumbnail + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content +hidden: + field_resident_editor: true + member_for: true diff --git a/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_view_display.user.user.default.yml b/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_view_display.user.user.default.yml new file mode 100644 index 0000000..f34b472 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/overrides/core.entity_view_display.user.user.default.yml @@ -0,0 +1,42 @@ +langcode: en +status: true +dependencies: + config: + - field.field.user.user.field_resident_editor + - field.field.user.user.user_picture + - image.style.thumbnail + module: + - image + - user +id: user.user.default +targetEntityType: user +bundle: user +mode: default +content: + field_resident_editor: + type: boolean + label: inline + settings: + format: unicode-yes-no + format_custom_false: '' + format_custom_true: '' + third_party_settings: { } + weight: 1 + region: content + member_for: + settings: { } + third_party_settings: { } + weight: 2 + region: content + user_picture: + type: image + label: hidden + settings: + image_link: content + image_style: thumbnail + image_loading: + attribute: lazy + third_party_settings: { } + weight: 0 + region: content +hidden: { } diff --git a/lib/modules/ddd_views/modules/ddd_news/config/schema/ddd_news.views.schema.yml b/lib/modules/ddd_views/modules/ddd_news/config/schema/ddd_news.views.schema.yml new file mode 100644 index 0000000..19f9866 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/config/schema/ddd_news.views.schema.yml @@ -0,0 +1,8 @@ +# 'ddd_relative_date_filter' should match your plugin name. +views.filter_value.ddd_relative_date_filter: + type: mapping + label: 'Relative Date Filter' + mapping: + relative_date: #matches machine name of the form element + type: string + label: 'Relative Date Filter' diff --git a/lib/modules/ddd_views/modules/ddd_news/ddd_news.info.yml b/lib/modules/ddd_views/modules/ddd_news/ddd_news.info.yml new file mode 100644 index 0000000..87f9373 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/ddd_news.info.yml @@ -0,0 +1,24 @@ +name: 'DDD News feature' +type: module +description: 'Provides custom functional views examples of DDD News feature.' +core_version_requirement: ^10 +package: 'ddd' +dependencies: + - drupal:views + +config_devel: + install: + - block.block.olivero_views_block__ddd_articles_access + - core.entity_view_display.user.user.default + - core.entity_view_display.user.user.compact + - core.entity_form_display.user.user.default + - field.storage.user.field_resident_editor + - field.field.user.user.field_resident_editor + - views.view.ddd_articles_access + - views.view.ddd_news_news_subscriptions + - views.view.ddd_people +# List of config overrides. Config_devel doesn't export these entries automatically. +# Copy them temporarily in the above list if you need to update them. +# - core.entity_view_display.user.user.default +# - core.entity_view_display.user.user.compact +# - core.entity_form_display.user.user.default diff --git a/lib/modules/ddd_views/modules/ddd_news/ddd_news.install b/lib/modules/ddd_views/modules/ddd_news/ddd_news.install new file mode 100644 index 0000000..536eb3d --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/ddd_news.install @@ -0,0 +1,56 @@ + 'Newsletter subscriptions', + 'fields' => [ + 'first_name' => [ + 'description' => 'First Name', + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + ], + 'last_name' => [ + 'description' => 'Last Name', + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + ], + 'email' => [ + 'description' => 'Email', + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + ], + 'created' => [ + 'description' => 'Created', + 'type' => 'int', + 'length' => 11, + 'not null' => TRUE, + 'default' => 0, + ], + 'is_active' => [ + 'description' => 'Is Active?', + 'type' => 'int', + 'size' => 'tiny', + 'default' => 0, + 'not null' => TRUE, + ], + ], + ]; + + return $schema; +} diff --git a/lib/modules/ddd_views/modules/ddd_news/ddd_news.module b/lib/modules/ddd_views/modules/ddd_news/ddd_news.module new file mode 100644 index 0000000..7697885 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/ddd_news.module @@ -0,0 +1,192 @@ + t('News subscriptions'), + + // Name of the module that provides the table schema. + 'provider' => 'ddd_news', + + // A table can be a "base" table, meaning that in Views you can use it as + // base for a View. Non-base tables can be associated to a base table via + // a relationship. The primary table for your custom data should be a base + // table. Add the "base" key with the following properties: + 'base' => [ + // Identifier (primary) field in this table for Views. + 'field' => 'email', + // Label in the UI. + 'title' => t('News subscriptions'), + // Longer description in the UI. Required. + 'help' => t('News subscriptions custom table'), + ] + ]; + + // This table references the {users_field_data} table. + // The declaration below creates an + // 'implicit' relationship to the table, so that when it is the base + // table, the fields are automatically available. + $data['ddd_news_subs']['table']['join'] = [ + // The key of this inner array is the name of the table to join to. + 'users_field_data' => [ + // The primary key in the referenced table e.g.) user_field_data.mail. + 'left_field' => 'mail', + // The foreign key in this table e.g.) news_subs.email. + 'field' => 'email', + ], + ]; + + // Other top level elements of the ddd_news_subs array define the individual + // columns of the table that you want to make available to Views. The key is + // the name (and must be unique) used by Views. It's usually the same as the + // name of the database column it describes. But doesn't have to be. It's + // possible to created computed fields that are not a one-to-one relationship + // to a column in the database. For example, a field that contains a link to + // edit a record from the table. + // + // The 'title' and 'help' elements are required. + // + // Each field definition needs to describe the views plugins (frequently + // called "handlers") that are responsible for handling the fields data in + // different scenarios including: field, filter, sort, argument, area, and + // relationship. All of which are optional. + $data['ddd_news_subs']['email'] = [ + // Human readable name of the field that will be displayed in the UI. + 'title' => t('Email'), + // Required help text that describes the content of the field. + 'help' => t('Subscription email.'), + // Optional handler to use when displaying a field. This maps to what a user + // will see in the "Fields" section of the Views configuration UI. Specify + // this if you want a user to be able to display the content of this field. + 'field' => [ + // ID of field handler plugin to use. More information about this below. + 'id' => 'standard', + ], + // Optional handler to use when sorting field data. This maps to what a user + // will see in the "Sort criteria" section of the Views configuration UI. + // Specify this if you want a user to be able to sort a Views results based + // on the content of this field. + 'sort' => [ + 'id' => 'standard', + ], + // Optional handler to use when filtering results based on a field. This + // maps to what a user will see in the "Filter criteria" section of the + // Views configuration UI. Specify this if you want a user to be able to + // filter a Views results based on the content of this field. + 'filter' => [ + 'id' => 'string', + ], + // Optional handler to use when making this field available as an argument. + // This maps to what a user will see in the "Contextual filters" section of + // the Views configuration UI. Specify this if you want a user to be able to + // use this field in contextual filters. + 'argument' => [ + 'id' => 'string', + ], + ]; + + // More examples of field descriptions. + $data['ddd_news_subs']['first_name'] = [ + 'title' => t('First name'), + 'help' => t('Subscriber\'s first name.'), + 'field' => [ + 'id' => 'standard', + ], + 'sort' => [ + 'id' => 'standard', + ], + 'filter' => [ + 'id' => 'string', + ], + 'argument' => [ + 'id' => 'string', + ], + ]; + + $data['ddd_news_subs']['last_name'] = [ + 'title' => t('Last name'), + 'help' => t('Subscriber\'s last name.'), + 'field' => [ + 'id' => 'standard', + ], + 'sort' => [ + 'id' => 'standard', + ], + 'filter' => [ + 'id' => 'string', + ], + 'argument' => [ + 'id' => 'string', + ], + ]; + + $data['ddd_news_subs']['created'] = [ + 'title' => t('Created'), + 'help' => t('Subscription date'), + 'field' => [ + 'id' => 'date', + ], + 'sort' => [ + 'id' => 'date', + ], + 'filter' => [ + 'title' => t('Subscription length'), + 'group' => t('Content'), + 'help' => t('Show subscribers that subscribed last week or month.'), + 'field' => 'created', + // Use our custom ddd_relative_date_filter plugin. The ID here is derived from + // the annotation on the filter plugin class. + 'id' => 'ddd_relative_date_filter', + ], + 'argument' => [ + 'id' => 'date', + ], + ]; + + $data['ddd_news_subs']['is_active'] = [ + 'title' => t('Is Active?'), + 'help' => t('Is it an active subscriber?'), + 'field' => [ + 'id' => 'boolean', + ], + 'sort' => [ + 'id' => 'numeric', + ], + 'filter' => [ + 'id' => 'boolean', + ], + 'argument' => [ + 'id' => 'standard', + ], + ]; + + return $data; +} + +/** + * Implements hook_theme(). + */ +function ddd_news_theme($existing, $type, $theme, $path) { + \Drupal::moduleHandler()->loadInclude('ddd_news', 'inc', 'ddd_news.theme'); + return [ + 'views_view_accordion' => [ + 'file' => 'ddd_news.theme.inc', + ], + ]; +} diff --git a/lib/modules/ddd_views/modules/ddd_news/ddd_news.services.yml b/lib/modules/ddd_views/modules/ddd_news/ddd_news.services.yml new file mode 100644 index 0000000..d0dc0a8 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/ddd_news.services.yml @@ -0,0 +1,6 @@ +services: + ddd_news.views_access: + class: Drupal\ddd_news\Access\CustomViewsAccessCheck + arguments: ['@current_user'] + tags: + - { name: access_check, applies_to: _custom_views_access_check } diff --git a/lib/modules/ddd_views/modules/ddd_news/ddd_news.theme.inc b/lib/modules/ddd_views/modules/ddd_news/ddd_news.theme.inc new file mode 100644 index 0000000..29d2722 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/ddd_news.theme.inc @@ -0,0 +1,30 @@ +style_plugin; + $options = $style->options; + $variables['default_row_class'] = !empty($options['default_row_class']); + foreach ($rows as $id => $row) { + $variables['rows'][$id] = []; + $variables['rows'][$id]['content'] = $row; + $variables['rows'][$id]['title'] = $options['summary_text']; + $variables['rows'][$id]['attributes'] = new Attribute(); + if ($row_class = $view->style_plugin->getRowClass($id)) { + $variables['rows'][$id]['attributes']->addClass($row_class); + } + } +} diff --git a/lib/modules/ddd_views/modules/ddd_news/src/Access/CustomViewsAccessCheck.php b/lib/modules/ddd_views/modules/ddd_news/src/Access/CustomViewsAccessCheck.php new file mode 100644 index 0000000..7d4c41d --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/src/Access/CustomViewsAccessCheck.php @@ -0,0 +1,40 @@ +id() == 1) { + return AccessResult::allowed(); + } + // Load user entity. + $user = \Drupal::entityTypeManager()->getStorage('user')->load($account->id()); + // The field_resident_editor is a custom field on the user entity type. Our + // access logic will not work without it. + if (isset($user->field_resident_editor) && $user->field_resident_editor->value) { + return AccessResult::allowed(); + } + else { + return AccessResult::forbidden(); + } + } + +} diff --git a/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/access/ResidentEditorAccess.php b/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/access/ResidentEditorAccess.php new file mode 100644 index 0000000..284983a --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/access/ResidentEditorAccess.php @@ -0,0 +1,48 @@ +t('Custom Access Settings'); + } + + /** + * {@inheritdoc} + */ + public function access(AccountInterface $account) { + $access = \Drupal::service('ddd_news.views_access')->access($account); + if (isset($access) && $access->isAllowed()) { + return TRUE; + } + else { + return FALSE; + } + } + + /** + * {@inheritdoc} + */ + public function alterRouteDefinition(Route $route){ + $route->setRequirement('_custom_access', 'news.views_access::access'); + } + +} diff --git a/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/filter/RelativeDateViewsFilter.php b/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/filter/RelativeDateViewsFilter.php new file mode 100644 index 0000000..91ea85a --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/filter/RelativeDateViewsFilter.php @@ -0,0 +1,70 @@ + TRUE, + 'relative_date' => [ + '#type' => 'select', + '#title' => $this->t('Subscribed'), + '#options' => [ + 'all' => $this->t('All'), + 'last_week' => $this->t('Last Week'), + 'last_month' => $this->t('Last Month'), + ], + '#default_value' => !empty($this->value['relative_date']) ? $this->value['relative_date'] : 'all', + ] + ]; + } + + /** + * Adds conditions to the query based on the selected filter option. + */ + public function query() { + $this->ensureMyTable(); + $date = "$this->tableAlias.$this->realField"; + switch ($this->value['relative_date']) { + case 'last_week': + $last_week_time = strtotime("first day of previous week"); + $this_week_time = strtotime("first day of this week"); + $last_week = "FROM_UNIXTIME(" . $last_week_time . ")"; + $this_week = "FROM_UNIXTIME(" . $this_week_time . ")"; + $this->query->addWhereExpression($this->options['group'], "$date >= $last_week AND $date < $this_week"); + break; + case 'last_month': + $last_month = strtotime("first day of previous month"); + $this_month = strtotime("first day of this month"); + $this->query->addWhereExpression($this->options['group'], "$date >= $last_month AND $date < $this_month"); + break; + } + } + + public function adminSummary() { + if ($this->isAGroup()) { + return $this->t('grouped'); + } + if (!empty($this->options['exposed'])) { + return $this->t('exposed') . ', ' . $this->t('default state') . ': ' . $this->value['relative_date']; + } + else { +// return $this->t('relative_date') . ': ' . $this->value['relative_date']; + } + } + +} diff --git a/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/style/AccordionViewsStyle.php b/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/style/AccordionViewsStyle.php new file mode 100644 index 0000000..96c33bb --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/src/Plugin/views/style/AccordionViewsStyle.php @@ -0,0 +1,57 @@ + '']; + return $options; + } + + /** + * Style options form. + */ + public function buildOptionsForm(&$form, FormStateInterface $form_state) { + parent::buildOptionsForm($form, $form_state); + $form['summary_text'] = [ + '#title' => $this->t('Summary text'), + '#description' => $this->t('Text to appear in the summary, leave blank if you don\'t want any text to appear.'), + '#type' => 'textfield', + '#size' => '30', + '#default_value' => $this->options['summary_text'], + ]; + } + +} diff --git a/lib/modules/ddd_views/modules/ddd_news/templates/views-view-accordion.html.twig b/lib/modules/ddd_views/modules/ddd_news/templates/views-view-accordion.html.twig new file mode 100644 index 0000000..d0e10b4 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_news/templates/views-view-accordion.html.twig @@ -0,0 +1,16 @@ +{# +/** + * Default theme implementation for Views accordion. + * + * @ingroup themeable + */ +#} +{% if title %} +

{{ title }}

+{% endif %} +{% for row in rows %} +
+ {{ row.title|t }} + {{- row.content -}} +
+{% endfor %} diff --git a/lib/modules/ddd_views/modules/ddd_search/config/overrides/views.view.search_content.yml b/lib/modules/ddd_views/modules/ddd_search/config/overrides/views.view.search_content.yml new file mode 100644 index 0000000..9081685 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_search/config/overrides/views.view.search_content.yml @@ -0,0 +1,178 @@ +langcode: en +status: true +dependencies: + config: + - search_api.index.default_index + module: + - search_api +id: search_content +label: 'Search content' +module: views +description: 'A search page preconfigured to search through the content of your site' +tag: '' +base_table: search_api_index_default_index +base_field: search_api_id +display: + default: + id: default + display_title: Master + display_plugin: default + position: 0 + display_options: + title: 'Search Content' + pager: + type: mini + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: 'next ›' + previous: '‹ previous' + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Search + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: none + options: { } + cache: + type: none + options: { } + empty: { } + sorts: + search_api_relevance: + id: search_api_relevance + table: search_api_index_default_index + field: search_api_relevance + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: DESC + expose: + label: '' + field_identifier: '' + exposed: false + arguments: { } + filters: + search_api_fulltext: + id: search_api_fulltext + table: search_api_index_default_index + field: search_api_fulltext + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api_fulltext + operator: or + value: '' + group: 1 + exposed: true + expose: + operator_id: search_op + label: Search + description: '' + use_operator: false + operator: search_op + operator_limit_selection: false + operator_list: { } + identifier: keys + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + content_editor: '0' + administrator: '0' + expose_fields: false + placeholder: '' + searched_fields_id: '' + value_maxlength: 128 + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + parse_mode: terms + min_length: 3 + fields: { } + style: + type: default + row: + type: search_api + options: + view_modes: + 'entity:node': + article: search_result + ddd_test_views: search_result + page: search_result + query: + type: search_api_query + options: { } + relationships: { } + header: + result: + id: result + table: views + field: result + relationship: none + group_type: group + admin_label: '' + plugin_id: result + empty: false + content: 'Displaying results @start - @end of @total' + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + tags: + - 'config:search_api.index.default_index' + - 'search_api_list:default_index' + cacheable: false + page_search_content: + id: page_search_content + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: search/content + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + tags: + - 'config:search_api.index.default_index' + - 'search_api_list:default_index' + cacheable: false diff --git a/lib/modules/ddd_views/modules/ddd_search/ddd_search.info.yml b/lib/modules/ddd_views/modules/ddd_search/ddd_search.info.yml new file mode 100644 index 0000000..94b0cf1 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_search/ddd_search.info.yml @@ -0,0 +1,13 @@ +name: 'DDD Search feature' +type: module +description: 'Provides custom functional search examples of DDD Search feature.' +core_version_requirement: ^10 +package: 'ddd' +dependencies: + - search_api:search_api_db + - search_api:search_api_db_defaults + - drupal:views + +#config_devel: +# install: +# - views.view.search_content diff --git a/lib/modules/ddd_views/modules/ddd_search/ddd_search.module b/lib/modules/ddd_views/modules/ddd_search/ddd_search.module new file mode 100644 index 0000000..920dccb --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_search/ddd_search.module @@ -0,0 +1,31 @@ +id() === 'search_content') { + // Look for an ?keys={VALUE} query string in the URL. + $keys = \Drupal::request()->query->get('keys'); + + if (!isset($keys) || empty($keys)) { + /** @var \Drupal\search_api\Plugin\views\query\SearchApiQuery $query */ + $query->sort('sticky', 'DESC'); + $query->sort('created', 'DESC'); + } + } + + // Not sure if this is an instance of \Drupal\views\Plugin\views\query\Sql or + // something else? Use get_class() to find out. + # echo get_class($query); +} diff --git a/lib/modules/ddd_views/modules/ddd_slider/config/install/views.view.ddd_articles_slider.yml b/lib/modules/ddd_views/modules/ddd_slider/config/install/views.view.ddd_articles_slider.yml new file mode 100644 index 0000000..beadcd5 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_slider/config/install/views.view.ddd_articles_slider.yml @@ -0,0 +1,198 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.article + - system.menu.main + module: + - node + - user +id: ddd_articles_slider +label: 'DDD - Articles - Slider' +module: views +description: "Alter a View before It's Rendered" +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'DDD - Articles - Slider' + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: some + options: + offset: 0 + items_per_page: 5 + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + empty: { } + sorts: + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: created + plugin_id: date + order: DESC + expose: + label: '' + field_identifier: '' + exposed: false + granularity: second + arguments: { } + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + type: + id: type + table: node_field_data + field: type + entity_type: node + entity_field: type + plugin_id: bundle + value: + article: article + style: + type: default + row: + type: 'entity:node' + options: + view_mode: teaser + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + css_class: news-slider + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } + block_1: + id: block_1 + display_title: Block + display_plugin: block + position: 1 + display_options: + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } + page_ddd_articles_slider: + id: page_ddd_articles_slider + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: ddd-articles-slider + menu: + type: normal + title: Slider + menu_name: main + parent: 'menu_link_content:e4720345-d30b-4c16-89d5-9b2e73cee015' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.info.yml b/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.info.yml new file mode 100644 index 0000000..0565be6 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.info.yml @@ -0,0 +1,11 @@ +name: 'DDD Slider feature' +type: module +description: 'Provides custom slider and a view of DDD Slider feature.' +core_version_requirement: ^10 +package: 'ddd' +dependencies: + - drupal:views + +config_devel: + install: + - views.view.ddd_articles_slider diff --git a/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.libraries.yml b/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.libraries.yml new file mode 100644 index 0000000..5bd359d --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.libraries.yml @@ -0,0 +1,11 @@ +slider: + version: 1.x + js: + /libraries/slick/slick.min.js: {} + js/init_slick.js: {} + css: + theme: + /libraries/slick/slick.css: {} + dependencies: + - core/jquery + - core/drupal diff --git a/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.module b/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.module new file mode 100644 index 0000000..865c910 --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_slider/ddd_slider.module @@ -0,0 +1,17 @@ +id() == 'ddd_articles_slider') { + $view->element['#attached']['library'][] = 'ddd_slider/slider'; + } +} diff --git a/lib/modules/ddd_views/modules/ddd_slider/js/init_slick.js b/lib/modules/ddd_views/modules/ddd_slider/js/init_slick.js new file mode 100644 index 0000000..a7569bb --- /dev/null +++ b/lib/modules/ddd_views/modules/ddd_slider/js/init_slick.js @@ -0,0 +1,20 @@ +/** + * @file + * Helper JavaScript for initializing sliders. + */ +(function ($, Drupal) { + $(document).ready(function() { + const slider = $('.view-ddd-articles-slider .view-content'); + slider.slick({ + slidesToShow: 1, + slidesToScroll: 1, + dots: false, + arrows: true, + infinite: true, + speed: 700, + autoplaySpeed: 5000, + autoplay: true + }); + }); + +})(jQuery, Drupal); diff --git a/lib/modules/ddd_views/src/Plugin/views/field/FullTime.php b/lib/modules/ddd_views/src/Plugin/views/field/FullTime.php new file mode 100644 index 0000000..05cfced --- /dev/null +++ b/lib/modules/ddd_views/src/Plugin/views/field/FullTime.php @@ -0,0 +1,41 @@ +_entity; + if ($node->bundle() !== 'ddd_test_views') { + return ''; + } + $cook_time = $node->field_cook_time->value; + $prep_time = $node->field_prep_time->value; + + $full_time = $cook_time + $prep_time; + $full_time_h = floor($full_time / 60); + $full_time_m = $full_time - $full_time_h * 60; + + return $this->t('@h h, @m min', ['@h' => $full_time_h, '@m' => $full_time_m]); + } +} diff --git a/lib/modules/ddd_views/src/Plugin/views/sort/TitleSort.php b/lib/modules/ddd_views/src/Plugin/views/sort/TitleSort.php new file mode 100644 index 0000000..c29f301 --- /dev/null +++ b/lib/modules/ddd_views/src/Plugin/views/sort/TitleSort.php @@ -0,0 +1,29 @@ +ensureMyTable(); + + $this->query->addField( + NULL, + "TRIM(LEADING 'a ' FROM TRIM(LEADING 'an ' FROM TRIM( LEADING 'the ' FROM LOWER($this->realField))))", + 'natural_sort' + ); + + $this->query->addOrderBy(NULL, NULL, $this->options['order'], 'natural_sort'); + } + +} diff --git a/lib/modules/responses/resources/lipsum1.pdf b/lib/modules/responses/resources/lipsum1.pdf new file mode 100644 index 0000000..349d557 Binary files /dev/null and b/lib/modules/responses/resources/lipsum1.pdf differ diff --git a/lib/modules/responses/responses.info.yml b/lib/modules/responses/responses.info.yml index 1cee3e0..1b94cb1 100644 --- a/lib/modules/responses/responses.info.yml +++ b/lib/modules/responses/responses.info.yml @@ -1,6 +1,6 @@ name: 'Responses' type: module -description: 'Provides module for the exercises of response from drupalizeme site.' -package: 'Drupalize' +description: 'Provides module for the exercises of response from drupalizeme site for DDD Responses feature.' +package: 'ddd' php: 8.x core_version_requirement: ^10 diff --git a/lib/modules/responses/responses.routing.yml b/lib/modules/responses/responses.routing.yml index e686270..f794a92 100644 --- a/lib/modules/responses/responses.routing.yml +++ b/lib/modules/responses/responses.routing.yml @@ -4,28 +4,43 @@ responses.example_plain_text: _controller: '\Drupal\responses\Controller\ExamplePlainTextController::build' _title: 'Example plain text' requirements: + # This is a test page, hence no access check is needed. _access: 'TRUE' - responses.example_cacheable_text: path: '/responses/example-cacheable-text' defaults: _controller: '\Drupal\responses\Controller\ExamplePlainTextControllerCacheable::buildCacheableResponse' _title: 'Example plain text with cacheability' requirements: + # This is a test page, hence no access check is needed. _access: 'TRUE' - responses.example_json_cached: path: '/responses/json-response-cached' defaults: _controller: '\Drupal\responses\Controller\ExampleJsonController::buildCacheableResponse' _title: 'Example JSON response cached' requirements: + # This is a test page, hence no access check is needed. _access: 'TRUE' - responses.example_plain_html: path: '/responses/example-plain-html' defaults: _controller: '\Drupal\responses\Controller\ExamplePlainHtmlController::build' _title: 'Example plain html' requirements: + # This is a test page, hence no access check is needed. _access: 'TRUE' +responses.pdf_download: + path: '/pdf-download' + defaults: + _controller: Drupal\responses\Controller\DownloadController::page + requirements: + _user_is_logged_in: 'TRUE' + +responses.download_page: + path: '/pdf-download-page' + defaults: + _title: 'Download Page' + _controller: '\Drupal\responses\Controller\DownloadPageController' + requirements: + _permission: 'access content' diff --git a/lib/modules/responses/src/Controller/DownloadController.php b/lib/modules/responses/src/Controller/DownloadController.php new file mode 100644 index 0000000..2e18776 --- /dev/null +++ b/lib/modules/responses/src/Controller/DownloadController.php @@ -0,0 +1,29 @@ +guessMimeType($file_path); + $response = new BinaryFileResponse($file_path); + $response->headers->set('Content-Type', $mime_type); + $response->setContentDisposition('attachment',basename($file_path)); + return $response; + } +} diff --git a/lib/modules/responses/src/Controller/DownloadPageController.php b/lib/modules/responses/src/Controller/DownloadPageController.php new file mode 100644 index 0000000..ea0d573 --- /dev/null +++ b/lib/modules/responses/src/Controller/DownloadPageController.php @@ -0,0 +1,26 @@ + 'item', + '#markup' => '

' . $this->t('Click on button to download example pdf') . '


' + . '' . $this->t('Download') . '', + ]; + + return $build; + } + +} diff --git a/lib/modules/responses/src/Controller/ExampleJsonController.php b/lib/modules/responses/src/Controller/ExampleJsonController.php index 7acdef5..670843e 100644 --- a/lib/modules/responses/src/Controller/ExampleJsonController.php +++ b/lib/modules/responses/src/Controller/ExampleJsonController.php @@ -1,8 +1,4 @@ entityTypeManager() diff --git a/lib/modules/responses/src/Controller/ExamplePlainHtmlController.php b/lib/modules/responses/src/Controller/ExamplePlainHtmlController.php index bdfd2c8..c5a1411 100644 --- a/lib/modules/responses/src/Controller/ExamplePlainHtmlController.php +++ b/lib/modules/responses/src/Controller/ExamplePlainHtmlController.php @@ -1,10 +1,5 @@ Nothing but HTML, baby', 200); return $response; diff --git a/lib/modules/responses/src/Controller/ExamplePlainTextController.php b/lib/modules/responses/src/Controller/ExamplePlainTextController.php index da3c680..5eb2a1d 100644 --- a/lib/modules/responses/src/Controller/ExamplePlainTextController.php +++ b/lib/modules/responses/src/Controller/ExamplePlainTextController.php @@ -1,10 +1,5 @@ t('Nothing but text, baby!')->render(), 200); diff --git a/lib/modules/responses/src/Controller/ExamplePlainTextControllerCacheable.php b/lib/modules/responses/src/Controller/ExamplePlainTextControllerCacheable.php index c239830..6b0473a 100644 --- a/lib/modules/responses/src/Controller/ExamplePlainTextControllerCacheable.php +++ b/lib/modules/responses/src/Controller/ExamplePlainTextControllerCacheable.php @@ -1,10 +1,5 @@ entityTypeManager() diff --git a/lib/modules/responses/tests/src/Unit/Controller/ExampleJsonControllerTest.php b/lib/modules/responses/tests/src/Unit/Controller/ExampleJsonControllerTest.php new file mode 100644 index 0000000..9469e18 --- /dev/null +++ b/lib/modules/responses/tests/src/Unit/Controller/ExampleJsonControllerTest.php @@ -0,0 +1,86 @@ +entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); + $this->userStorage = $this->createMock(EntityStorageInterface::class); + $this->entityTypeManager->expects($this->any()) + ->method('getStorage') + ->with('user') + ->willReturn($this->userStorage); + + $sender = $this->createMock(AccountInterface::class); + $this->userStorage->expects($this->any()) + ->method('load') + ->willReturn($sender); + // User IDs 1 and 0 have special implications, use 9999 instead. + $sender->expects($this->any()) + ->method('id') + ->willReturn(9999); + $sender->expects($this->once()) + ->method('getDisplayName') + ->willReturn('Horse Luis'); + $sender->expects($this->once()) + ->method('getEmail') + ->willReturn('horse.luis@mail.com'); + $sender->expects($this->once()) + ->method('getRoles') + ->willReturn('[administrator]'); + + $container = new ContainerBuilder(); + $container->set('entity_type.manager', $this->entityTypeManager); + $container->set('current_user', $sender); + \Drupal::setContainer($container); + } + + /** + * Tests the buildCacheableResponse() method of the ExampleJsonController. + * + * @covers ::buildCacheableResponse + */ + public function testbuildCacheableResponse() { + $jsonController = new ExampleJsonController(); + + $response = $jsonController->buildCacheableResponse(); + $this->assertEquals('200', $response->getStatusCode()); + $this->assertEquals('{"user":{"id":9999,"name":"Horse Luis","email":"horse.luis@mail.com","roles":"[administrator]"}}', $response->getContent()); + } + +} diff --git a/lib/modules/subscriber/config/install/system.action.subscriber_delete_action.yml b/lib/modules/subscriber/config/install/system.action.subscriber_delete_action.yml new file mode 100644 index 0000000..ece76e0 --- /dev/null +++ b/lib/modules/subscriber/config/install/system.action.subscriber_delete_action.yml @@ -0,0 +1,10 @@ +langcode: en +status: true +dependencies: + module: + - subscriber +id: subscriber_delete_action +label: 'Delete subscribers' +type: subscriber +plugin: entity:delete_action:subscriber +configuration: { } diff --git a/lib/modules/subscriber/config/install/views.view.subscribers.yml b/lib/modules/subscriber/config/install/views.view.subscribers.yml new file mode 100644 index 0000000..81c4e61 --- /dev/null +++ b/lib/modules/subscriber/config/install/views.view.subscribers.yml @@ -0,0 +1,490 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.subscriber.field_first_name + - field.storage.subscriber.field_last_name + - user.role.administrator + module: + - subscriber + - user +id: subscribers +label: Subscribers +module: views +description: 'Exposes Custom Entities to Views' +tag: '' +base_table: subscriber +base_field: id +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: Subscribers + fields: + id: + id: id + table: subscriber + field: id + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: id + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_first_name: + id: field_first_name + table: subscriber__field_first_name + field: field_first_name + relationship: none + group_type: group + admin_label: '' + plugin_id: field + label: 'First name' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_last_name: + id: field_last_name + table: subscriber__field_last_name + field: field_last_name + relationship: none + group_type: group + admin_label: '' + plugin_id: field + label: 'Last name' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + mail: + id: mail + table: users_field_data + field: mail + relationship: email + group_type: group + admin_label: '' + entity_type: user + entity_field: mail + plugin_id: field + label: Email + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: basic_string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + operations: + id: operations + table: subscriber + field: operations + relationship: none + group_type: group + admin_label: '' + entity_type: subscriber + plugin_id: entity_operations + label: 'Operation links' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: false + pager: + type: mini + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: role + options: + role: + administrator: administrator + cache: + type: tag + options: { } + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: 'There are no subscribers at the moment. Please, go to Content > Subscribers and create new content.' + format: basic_html + tokenize: false + sorts: { } + arguments: { } + filters: { } + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + id: id + field_first_name: field_first_name + field_last_name: field_last_name + email: email + operations: operations + default: '-1' + info: + id: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + field_first_name: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + field_last_name: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + email: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + operations: + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: + email: + id: email + table: subscriber + field: email + relationship: none + group_type: group + admin_label: 'Related users' + entity_type: subscriber + entity_field: email + plugin_id: standard + required: false + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - user.roles + tags: + - 'config:field.storage.subscriber.field_first_name' + - 'config:field.storage.subscriber.field_last_name' + page_subscribers: + id: page_subscribers + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: subscribers + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - user.roles + tags: + - 'config:field.storage.subscriber.field_first_name' + - 'config:field.storage.subscriber.field_last_name' diff --git a/lib/modules/subscriber/src/Entity/Subscriber.php b/lib/modules/subscriber/src/Entity/Subscriber.php new file mode 100644 index 0000000..1234497 --- /dev/null +++ b/lib/modules/subscriber/src/Entity/Subscriber.php @@ -0,0 +1,74 @@ +setLabel(t('Email')) + ->setDescription(t('The email of the subsciber.')) + ->setDefaultValue('') + ->setDisplayConfigurable('form', TRUE) + ->setDisplayConfigurable('view', TRUE) + ->setRequired(TRUE) + ->addConstraint('UserMailRequired') + ->addConstraint('UserMailUnique'); + + return $fields; + } +} diff --git a/lib/modules/subscriber/src/Form/SubscriberForm.php b/lib/modules/subscriber/src/Form/SubscriberForm.php new file mode 100644 index 0000000..386d9d8 --- /dev/null +++ b/lib/modules/subscriber/src/Form/SubscriberForm.php @@ -0,0 +1,45 @@ + $this->entity->toLink()->toString()]; + $logger_args = [ + '%label' => $this->entity->label(), + 'link' => $this->entity->toLink($this->t('View'))->toString(), + ]; + + switch ($result) { + case SAVED_NEW: + $this->messenger()->addStatus($this->t('New subscriber %label has been created.', $message_args)); + $this->logger('subscriber')->notice('New subscriber %label has been created.', $logger_args); + break; + + case SAVED_UPDATED: + $this->messenger()->addStatus($this->t('The subscriber %label has been updated.', $message_args)); + $this->logger('subscriber')->notice('The subscriber %label has been updated.', $logger_args); + break; + + default: + throw new \LogicException('Could not save the entity.'); + } + + $form_state->setRedirectUrl($this->entity->toUrl()); + + return $result; + } + +} diff --git a/lib/modules/subscriber/src/Form/SubscriberSettingsForm.php b/lib/modules/subscriber/src/Form/SubscriberSettingsForm.php new file mode 100644 index 0000000..5e5ba7b --- /dev/null +++ b/lib/modules/subscriber/src/Form/SubscriberSettingsForm.php @@ -0,0 +1,47 @@ + $this->t('Settings form for a subscriber entity type.'), + ]; + + $form['actions'] = [ + '#type' => 'actions', + 'submit' => [ + '#type' => 'submit', + '#value' => $this->t('Save'), + ], + ]; + + return $form; + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state): void { + $this->messenger()->addStatus($this->t('The configuration has been updated.')); + } + +} diff --git a/lib/modules/subscriber/src/SubscriberEntityViewsData.php b/lib/modules/subscriber/src/SubscriberEntityViewsData.php new file mode 100644 index 0000000..93f0c2d --- /dev/null +++ b/lib/modules/subscriber/src/SubscriberEntityViewsData.php @@ -0,0 +1,39 @@ + $this->t('Related users'), + 'help' => $this->t('Relate users to subscribers.'), + 'base' => 'users_field_data', + 'base field' => 'mail', + // ID of relationship handler plugin to use. + 'id' => 'standard', + // Default label for relationship in the UI. + 'label' => $this->t('Related users'), + ]; + + return $data; + } + +} diff --git a/lib/modules/subscriber/src/SubscriberInterface.php b/lib/modules/subscriber/src/SubscriberInterface.php new file mode 100644 index 0000000..b32c08e --- /dev/null +++ b/lib/modules/subscriber/src/SubscriberInterface.php @@ -0,0 +1,12 @@ +t('ID'); + return $header + parent::buildHeader(); + } + + /** + * {@inheritdoc} + */ + public function buildRow(EntityInterface $entity): array { + /** @var \Drupal\subscriber\SubscriberInterface $entity */ + $row['id'] = $entity->toLink(); + return $row + parent::buildRow($entity); + } + +} diff --git a/lib/modules/subscriber/subscriber.info.yml b/lib/modules/subscriber/subscriber.info.yml new file mode 100644 index 0000000..137b9b9 --- /dev/null +++ b/lib/modules/subscriber/subscriber.info.yml @@ -0,0 +1,9 @@ +name: 'Subscriber' +type: module +description: 'Provides a custom entity Subscriber for demo purposes.' +package: ddd +core_version_requirement: ^10 + +config_devel: + install: + - views.view.subscribers diff --git a/lib/modules/subscriber/subscriber.links.action.yml b/lib/modules/subscriber/subscriber.links.action.yml new file mode 100644 index 0000000..13b068f --- /dev/null +++ b/lib/modules/subscriber/subscriber.links.action.yml @@ -0,0 +1,5 @@ +subscriber.add_form: + title: 'Add subscriber' + route_name: entity.subscriber.add_form + appears_on: + - entity.subscriber.collection diff --git a/lib/modules/subscriber/subscriber.links.menu.yml b/lib/modules/subscriber/subscriber.links.menu.yml new file mode 100644 index 0000000..7d8dc9f --- /dev/null +++ b/lib/modules/subscriber/subscriber.links.menu.yml @@ -0,0 +1,11 @@ +entity.subscriber.settings: + title: 'Subscriber' + description: 'Configure a Subscriber entity type.' + route_name: entity.subscriber.settings + parent: system.admin_structure + +entity.subscriber.collection: + title: 'Subscribers' + description: 'List of subscribers.' + route_name: entity.subscriber.collection + parent: system.admin_content diff --git a/lib/modules/subscriber/subscriber.links.task.yml b/lib/modules/subscriber/subscriber.links.task.yml new file mode 100644 index 0000000..b93151f --- /dev/null +++ b/lib/modules/subscriber/subscriber.links.task.yml @@ -0,0 +1,22 @@ +entity.subscriber.settings: + title: 'Settings' + route_name: entity.subscriber.settings + base_route: entity.subscriber.settings +entity.subscriber.view: + title: 'View' + route_name: entity.subscriber.canonical + base_route: entity.subscriber.canonical +entity.subscriber.edit_form: + title: 'Edit' + route_name: entity.subscriber.edit_form + base_route: entity.subscriber.canonical +entity.subscriber.delete_form: + title: 'Delete' + route_name: entity.subscriber.delete_form + base_route: entity.subscriber.canonical + weight: 10 +entity.subscriber.collection: + title: 'Subscribers' + route_name: entity.subscriber.collection + base_route: system.admin_content + weight: 10 diff --git a/lib/modules/subscriber/subscriber.permissions.yml b/lib/modules/subscriber/subscriber.permissions.yml new file mode 100644 index 0000000..161a0a8 --- /dev/null +++ b/lib/modules/subscriber/subscriber.permissions.yml @@ -0,0 +1,3 @@ +administer subscriber: + title: 'Administer subscribers' + restrict access: true diff --git a/lib/modules/subscriber/subscriber.routing.yml b/lib/modules/subscriber/subscriber.routing.yml new file mode 100644 index 0000000..4dc5df9 --- /dev/null +++ b/lib/modules/subscriber/subscriber.routing.yml @@ -0,0 +1,7 @@ +entity.subscriber.settings: + path: 'admin/structure/subscriber' + defaults: + _form: '\Drupal\subscriber\Form\SubscriberSettingsForm' + _title: 'Subscriber' + requirements: + _permission: 'administer subscriber' diff --git a/lib/modules/tdd_tiered_price/README.md b/lib/modules/tdd_tiered_price/README.md index 2b204a6..5fd4fdc 100644 --- a/lib/modules/tdd_tiered_price/README.md +++ b/lib/modules/tdd_tiered_price/README.md @@ -4,9 +4,11 @@ Companies want to get Codely subscriptions for their employees. -We need to calculate the total price of the subscription given the number of subscription that a company wants to purchase. +We need to calculate the total price of the subscription given the number of +subscription that a company wants to purchase. -The annual unit price of the subscription depends on the volume of the subscriptions as shown in the following table: +The annual unit price of the subscription depends on the volume of the +subscriptions as shown in the following table: | Range | Unit price | |--------|-------------| @@ -34,4 +36,3 @@ Here are some examples that can guide you during the development process: | 50 | 199 € | 9950 € | | 51 | 149 € | 7599 € | | 52 | 149 € | 7748 € | - diff --git a/lib/modules/tdd_tiered_price/src/TddTieredPrice.php b/lib/modules/tdd_tiered_price/src/TddTieredPrice.php index a5ca163..06601bf 100644 --- a/lib/modules/tdd_tiered_price/src/TddTieredPrice.php +++ b/lib/modules/tdd_tiered_price/src/TddTieredPrice.php @@ -8,11 +8,15 @@ * TDD Tiered price calculator. */ class TddTieredPrice { + /** + * Gets tiered price. + * * @return int * The tiered price */ public function getTieredPrice(): int { return (299); } + } diff --git a/lib/modules/tdd_tiered_price/tdd_tiered_price.info.yml b/lib/modules/tdd_tiered_price/tdd_tiered_price.info.yml index 415026b..8ab7891 100644 --- a/lib/modules/tdd_tiered_price/tdd_tiered_price.info.yml +++ b/lib/modules/tdd_tiered_price/tdd_tiered_price.info.yml @@ -1,6 +1,6 @@ name: 'TDD Tiered price' type: module description: 'Provides module for the management of Tiered price.' -package: 'TDD' +package: 'ddd' php: 8.x core_version_requirement: ^10 diff --git a/lib/modules/tdd_tiered_price/tests/src/Unit/TddTieredPriceTest.php b/lib/modules/tdd_tiered_price/tests/src/Unit/TddTieredPriceTest.php index d2a6663..e7cf776 100644 --- a/lib/modules/tdd_tiered_price/tests/src/Unit/TddTieredPriceTest.php +++ b/lib/modules/tdd_tiered_price/tests/src/Unit/TddTieredPriceTest.php @@ -14,6 +14,7 @@ * @coversDefaultClass \Drupal\tdd_tiered_price\TddTieredPrice */ class TddTieredPriceTest extends UnitTestCase { + /** * Test getting a tiered price. * @@ -24,4 +25,5 @@ public function testGetTieredPrice() { $tdd_tiered_price = new TddTieredPrice(); $this->assertEquals($expected_result, $tdd_tiered_price->getTieredPrice(1)); } + } diff --git a/lib/modules/tester_base/src/Controller/WhoamiController.php b/lib/modules/tester_base/src/Controller/WhoamiController.php new file mode 100644 index 0000000..c789d0c --- /dev/null +++ b/lib/modules/tester_base/src/Controller/WhoamiController.php @@ -0,0 +1,22 @@ + '

This is the content of the Who Am I route!

', + ]; + } + +} diff --git a/lib/modules/tester_base/tester_base.info.yml b/lib/modules/tester_base/tester_base.info.yml new file mode 100644 index 0000000..3a65226 --- /dev/null +++ b/lib/modules/tester_base/tester_base.info.yml @@ -0,0 +1,6 @@ +name: 'Tester base' +type: module +description: 'Provides module for the training of pupunit, behat and other stuff of testing for DDD Tester base feature.' +package: 'ddd' +php: 8.x +core_version_requirement: ^10 diff --git a/lib/modules/tester_base/tester_base.routing.yml b/lib/modules/tester_base/tester_base.routing.yml new file mode 100644 index 0000000..ae674b2 --- /dev/null +++ b/lib/modules/tester_base/tester_base.routing.yml @@ -0,0 +1,7 @@ +tester_base.whoami: + path: '/whoami' + defaults: + _controller: '\Drupal\tester_base\Controller\WhoamiController::build' + _title: 'Who Am I' + requirements: + _permission: 'access_content' diff --git a/lib/modules/tester_base/tests/src/Unit/Controller/WhoamiControllerTest.php b/lib/modules/tester_base/tests/src/Unit/Controller/WhoamiControllerTest.php new file mode 100644 index 0000000..cd593cc --- /dev/null +++ b/lib/modules/tester_base/tests/src/Unit/Controller/WhoamiControllerTest.php @@ -0,0 +1,30 @@ +build(); + $this->assertEquals('

This is the content of the Who Am I route!

', $response['#markup']); + } + +} diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..3c99149 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,26 @@ + + + QA PHPcs Ruleset + + + + + + + + + + + ./lib + ./resources + + dist/ + .cache/ + vendor/ + web/ + node_modules/ + config/ + *.min.css + *.min.js + + diff --git a/phpmd.xml b/phpmd.xml new file mode 100644 index 0000000..3121a39 --- /dev/null +++ b/phpmd.xml @@ -0,0 +1,19 @@ + + + Toolkit PHP Mess Detector ruleset + + + + + + + + diff --git a/resources/libraries/slick/ajax-loader.gif b/resources/libraries/slick/ajax-loader.gif new file mode 100755 index 0000000..e0e6e97 Binary files /dev/null and b/resources/libraries/slick/ajax-loader.gif differ diff --git a/resources/libraries/slick/config.rb b/resources/libraries/slick/config.rb new file mode 100755 index 0000000..81f5ae3 --- /dev/null +++ b/resources/libraries/slick/config.rb @@ -0,0 +1,10 @@ +css_dir = "." +sass_dir = "." +images_dir = "." +fonts_dir = "fonts" +relative_assets = true + +output_style = :compact +line_comments = false + +preferred_syntax = :scss \ No newline at end of file diff --git a/resources/libraries/slick/fonts/slick.eot b/resources/libraries/slick/fonts/slick.eot new file mode 100755 index 0000000..2cbab9c Binary files /dev/null and b/resources/libraries/slick/fonts/slick.eot differ diff --git a/resources/libraries/slick/fonts/slick.svg b/resources/libraries/slick/fonts/slick.svg new file mode 100755 index 0000000..b36a66a --- /dev/null +++ b/resources/libraries/slick/fonts/slick.svg @@ -0,0 +1,14 @@ + + + +Generated by Fontastic.me + + + + + + + + + + diff --git a/resources/libraries/slick/fonts/slick.ttf b/resources/libraries/slick/fonts/slick.ttf new file mode 100755 index 0000000..9d03461 Binary files /dev/null and b/resources/libraries/slick/fonts/slick.ttf differ diff --git a/resources/libraries/slick/fonts/slick.woff b/resources/libraries/slick/fonts/slick.woff new file mode 100755 index 0000000..8ee9972 Binary files /dev/null and b/resources/libraries/slick/fonts/slick.woff differ diff --git a/resources/libraries/slick/slick-theme.css b/resources/libraries/slick/slick-theme.css new file mode 100755 index 0000000..1232fca --- /dev/null +++ b/resources/libraries/slick/slick-theme.css @@ -0,0 +1,204 @@ +@charset 'UTF-8'; +/* Slider */ +.slick-loading .slick-list +{ + background: #fff url('./ajax-loader.gif') center center no-repeat; +} + +/* Icons */ +@font-face +{ + font-family: 'slick'; + font-weight: normal; + font-style: normal; + + src: url('./fonts/slick.eot'); + src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); +} +/* Arrows */ +.slick-prev, +.slick-next +{ + font-size: 0; + line-height: 0; + + position: absolute; + top: 50%; + + display: block; + + width: 20px; + height: 20px; + padding: 0; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + + cursor: pointer; + + color: transparent; + border: none; + outline: none; + background: transparent; +} +.slick-prev:hover, +.slick-prev:focus, +.slick-next:hover, +.slick-next:focus +{ + color: transparent; + outline: none; + background: transparent; +} +.slick-prev:hover:before, +.slick-prev:focus:before, +.slick-next:hover:before, +.slick-next:focus:before +{ + opacity: 1; +} +.slick-prev.slick-disabled:before, +.slick-next.slick-disabled:before +{ + opacity: .25; +} + +.slick-prev:before, +.slick-next:before +{ + font-family: 'slick'; + font-size: 20px; + line-height: 1; + + opacity: .75; + color: white; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.slick-prev +{ + left: -25px; +} +[dir='rtl'] .slick-prev +{ + right: -25px; + left: auto; +} +.slick-prev:before +{ + content: '←'; +} +[dir='rtl'] .slick-prev:before +{ + content: '→'; +} + +.slick-next +{ + right: -25px; +} +[dir='rtl'] .slick-next +{ + right: auto; + left: -25px; +} +.slick-next:before +{ + content: '→'; +} +[dir='rtl'] .slick-next:before +{ + content: '←'; +} + +/* Dots */ +.slick-dotted.slick-slider +{ + margin-bottom: 30px; +} + +.slick-dots +{ + position: absolute; + bottom: -25px; + + display: block; + + width: 100%; + padding: 0; + margin: 0; + + list-style: none; + + text-align: center; +} +.slick-dots li +{ + position: relative; + + display: inline-block; + + width: 20px; + height: 20px; + margin: 0 5px; + padding: 0; + + cursor: pointer; +} +.slick-dots li button +{ + font-size: 0; + line-height: 0; + + display: block; + + width: 20px; + height: 20px; + padding: 5px; + + cursor: pointer; + + color: transparent; + border: 0; + outline: none; + background: transparent; +} +.slick-dots li button:hover, +.slick-dots li button:focus +{ + outline: none; +} +.slick-dots li button:hover:before, +.slick-dots li button:focus:before +{ + opacity: 1; +} +.slick-dots li button:before +{ + font-family: 'slick'; + font-size: 6px; + line-height: 20px; + + position: absolute; + top: 0; + left: 0; + + width: 20px; + height: 20px; + + content: '•'; + text-align: center; + + opacity: .25; + color: black; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.slick-dots li.slick-active button:before +{ + opacity: .75; + color: black; +} diff --git a/resources/libraries/slick/slick-theme.less b/resources/libraries/slick/slick-theme.less new file mode 100755 index 0000000..e06fc18 --- /dev/null +++ b/resources/libraries/slick/slick-theme.less @@ -0,0 +1,168 @@ +@charset "UTF-8"; + +// Default Variables + +@slick-font-path: "./fonts/"; +@slick-font-family: "slick"; +@slick-loader-path: "./"; +@slick-arrow-color: white; +@slick-dot-color: black; +@slick-dot-color-active: @slick-dot-color; +@slick-prev-character: "←"; +@slick-next-character: "→"; +@slick-dot-character: "•"; +@slick-dot-size: 6px; +@slick-opacity-default: 0.75; +@slick-opacity-on-hover: 1; +@slick-opacity-not-active: 0.25; + +/* Slider */ +.slick-loading .slick-list{ + background: #fff url('@{slick-loader-path}ajax-loader.gif') center center no-repeat; +} + +/* Arrows */ +.slick-prev, +.slick-next { + position: absolute; + display: block; + height: 20px; + width: 20px; + line-height: 0px; + font-size: 0px; + cursor: pointer; + background: transparent; + color: transparent; + top: 50%; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + padding: 0; + border: none; + outline: none; + &:hover, &:focus { + outline: none; + background: transparent; + color: transparent; + &:before { + opacity: @slick-opacity-on-hover; + } + } + &.slick-disabled:before { + opacity: @slick-opacity-not-active; + } +} + +.slick-prev:before, .slick-next:before { + font-family: @slick-font-family; + font-size: 20px; + line-height: 1; + color: @slick-arrow-color; + opacity: @slick-opacity-default; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + & when ( @slick-font-family = 'slick' ) { + /* Icons */ + @font-face { + font-family: 'slick'; + font-weight: normal; + font-style: normal; + src: url('@{slick-font-path}slick.eot'); + src: url('@{slick-font-path}slick.eot?#iefix') format('embedded-opentype'), url('@{slick-font-path}slick.woff') format('woff'), url('@{slick-font-path}slick.ttf') format('truetype'), url('@{slick-font-path}slick.svg#slick') format('svg'); + } + } +} + +.slick-prev { + left: -25px; + [dir="rtl"] & { + left: auto; + right: -25px; + } + &:before { + content: @slick-prev-character; + [dir="rtl"] & { + content: @slick-next-character; + } + } +} + +.slick-next { + right: -25px; + [dir="rtl"] & { + left: -25px; + right: auto; + } + &:before { + content: @slick-next-character; + [dir="rtl"] & { + content: @slick-prev-character; + } + } +} + +/* Dots */ + +.slick-dotted .slick-slider { + margin-bottom: 30px; +} + +.slick-dots { + position: absolute; + bottom: -25px; + list-style: none; + display: block; + text-align: center; + padding: 0; + margin: 0; + width: 100%; + li { + position: relative; + display: inline-block; + height: 20px; + width: 20px; + margin: 0 5px; + padding: 0; + cursor: pointer; + button { + border: 0; + background: transparent; + display: block; + height: 20px; + width: 20px; + outline: none; + line-height: 0px; + font-size: 0px; + color: transparent; + padding: 5px; + cursor: pointer; + &:hover, &:focus { + outline: none; + &:before { + opacity: @slick-opacity-on-hover; + } + } + &:before { + position: absolute; + top: 0; + left: 0; + content: @slick-dot-character; + width: 20px; + height: 20px; + font-family: @slick-font-family; + font-size: @slick-dot-size; + line-height: 20px; + text-align: center; + color: @slick-dot-color; + opacity: @slick-opacity-not-active; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + } + &.slick-active button:before { + color: @slick-dot-color-active; + opacity: @slick-opacity-default; + } + } +} diff --git a/resources/libraries/slick/slick-theme.scss b/resources/libraries/slick/slick-theme.scss new file mode 100755 index 0000000..7fe63e1 --- /dev/null +++ b/resources/libraries/slick/slick-theme.scss @@ -0,0 +1,194 @@ +@charset "UTF-8"; + +// Default Variables + +// Slick icon entity codes outputs the following +// "\2190" outputs ascii character "←" +// "\2192" outputs ascii character "→" +// "\2022" outputs ascii character "•" + +$slick-font-path: "./fonts/" !default; +$slick-font-family: "slick" !default; +$slick-loader-path: "./" !default; +$slick-arrow-color: white !default; +$slick-dot-color: black !default; +$slick-dot-color-active: $slick-dot-color !default; +$slick-prev-character: "\2190" !default; +$slick-next-character: "\2192" !default; +$slick-dot-character: "\2022" !default; +$slick-dot-size: 6px !default; +$slick-opacity-default: 0.75 !default; +$slick-opacity-on-hover: 1 !default; +$slick-opacity-not-active: 0.25 !default; + +@function slick-image-url($url) { + @if function-exists(image-url) { + @return image-url($url); + } + @else { + @return url($slick-loader-path + $url); + } +} + +@function slick-font-url($url) { + @if function-exists(font-url) { + @return font-url($url); + } + @else { + @return url($slick-font-path + $url); + } +} + +/* Slider */ + +.slick-list { + .slick-loading & { + background: #fff slick-image-url("ajax-loader.gif") center center no-repeat; + } +} + +/* Icons */ +@if $slick-font-family == "slick" { + @font-face { + font-family: "slick"; + src: slick-font-url("slick.eot"); + src: slick-font-url("slick.eot?#iefix") format("embedded-opentype"), slick-font-url("slick.woff") format("woff"), slick-font-url("slick.ttf") format("truetype"), slick-font-url("slick.svg#slick") format("svg"); + font-weight: normal; + font-style: normal; + } +} + +/* Arrows */ + +.slick-prev, +.slick-next { + position: absolute; + display: block; + height: 20px; + width: 20px; + line-height: 0px; + font-size: 0px; + cursor: pointer; + background: transparent; + color: transparent; + top: 50%; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + padding: 0; + border: none; + outline: none; + &:hover, &:focus { + outline: none; + background: transparent; + color: transparent; + &:before { + opacity: $slick-opacity-on-hover; + } + } + &.slick-disabled:before { + opacity: $slick-opacity-not-active; + } + &:before { + font-family: $slick-font-family; + font-size: 20px; + line-height: 1; + color: $slick-arrow-color; + opacity: $slick-opacity-default; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } +} + +.slick-prev { + left: -25px; + [dir="rtl"] & { + left: auto; + right: -25px; + } + &:before { + content: $slick-prev-character; + [dir="rtl"] & { + content: $slick-next-character; + } + } +} + +.slick-next { + right: -25px; + [dir="rtl"] & { + left: -25px; + right: auto; + } + &:before { + content: $slick-next-character; + [dir="rtl"] & { + content: $slick-prev-character; + } + } +} + +/* Dots */ + +.slick-dotted.slick-slider { + margin-bottom: 30px; +} + +.slick-dots { + position: absolute; + bottom: -25px; + list-style: none; + display: block; + text-align: center; + padding: 0; + margin: 0; + width: 100%; + li { + position: relative; + display: inline-block; + height: 20px; + width: 20px; + margin: 0 5px; + padding: 0; + cursor: pointer; + button { + border: 0; + background: transparent; + display: block; + height: 20px; + width: 20px; + outline: none; + line-height: 0px; + font-size: 0px; + color: transparent; + padding: 5px; + cursor: pointer; + &:hover, &:focus { + outline: none; + &:before { + opacity: $slick-opacity-on-hover; + } + } + &:before { + position: absolute; + top: 0; + left: 0; + content: $slick-dot-character; + width: 20px; + height: 20px; + font-family: $slick-font-family; + font-size: $slick-dot-size; + line-height: 20px; + text-align: center; + color: $slick-dot-color; + opacity: $slick-opacity-not-active; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + } + &.slick-active button:before { + color: $slick-dot-color-active; + opacity: $slick-opacity-default; + } + } +} diff --git a/resources/libraries/slick/slick.css b/resources/libraries/slick/slick.css new file mode 100755 index 0000000..57477e8 --- /dev/null +++ b/resources/libraries/slick/slick.css @@ -0,0 +1,119 @@ +/* Slider */ +.slick-slider +{ + position: relative; + + display: block; + box-sizing: border-box; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + -webkit-touch-callout: none; + -khtml-user-select: none; + -ms-touch-action: pan-y; + touch-action: pan-y; + -webkit-tap-highlight-color: transparent; +} + +.slick-list +{ + position: relative; + + display: block; + overflow: hidden; + + margin: 0; + padding: 0; +} +.slick-list:focus +{ + outline: none; +} +.slick-list.dragging +{ + cursor: pointer; + cursor: hand; +} + +.slick-slider .slick-track, +.slick-slider .slick-list +{ + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} + +.slick-track +{ + position: relative; + top: 0; + left: 0; + + display: block; + margin-left: auto; + margin-right: auto; +} +.slick-track:before, +.slick-track:after +{ + display: table; + + content: ''; +} +.slick-track:after +{ + clear: both; +} +.slick-loading .slick-track +{ + visibility: hidden; +} + +.slick-slide +{ + display: none; + float: left; + + height: 100%; + min-height: 1px; +} +[dir='rtl'] .slick-slide +{ + float: right; +} +.slick-slide img +{ + display: block; +} +.slick-slide.slick-loading img +{ + display: none; +} +.slick-slide.dragging img +{ + pointer-events: none; +} +.slick-initialized .slick-slide +{ + display: block; +} +.slick-loading .slick-slide +{ + visibility: hidden; +} +.slick-vertical .slick-slide +{ + display: block; + + height: auto; + + border: 1px solid transparent; +} +.slick-arrow.slick-hidden { + display: none; +} diff --git a/resources/libraries/slick/slick.js b/resources/libraries/slick/slick.js new file mode 100755 index 0000000..6a2a099 --- /dev/null +++ b/resources/libraries/slick/slick.js @@ -0,0 +1,3011 @@ +/* + _ _ _ _ + ___| (_) ___| | __ (_)___ +/ __| | |/ __| |/ / | / __| +\__ \ | | (__| < _ | \__ \ +|___/_|_|\___|_|\_(_)/ |___/ + |__/ + + Version: 1.8.0 + Author: Ken Wheeler + Website: http://kenwheeler.github.io + Docs: http://kenwheeler.github.io/slick + Repo: http://github.com/kenwheeler/slick + Issues: http://github.com/kenwheeler/slick/issues + + */ +/* global window, document, define, jQuery, setInterval, clearInterval */ +;(function(factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof exports !== 'undefined') { + module.exports = factory(require('jquery')); + } else { + factory(jQuery); + } + +}(function($) { + 'use strict'; + var Slick = window.Slick || {}; + + Slick = (function() { + + var instanceUid = 0; + + function Slick(element, settings) { + + var _ = this, dataSettings; + + _.defaults = { + accessibility: true, + adaptiveHeight: false, + appendArrows: $(element), + appendDots: $(element), + arrows: true, + asNavFor: null, + prevArrow: '', + nextArrow: '', + autoplay: false, + autoplaySpeed: 3000, + centerMode: false, + centerPadding: '50px', + cssEase: 'ease', + customPaging: function(slider, i) { + return $('',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('