This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First: You have declared the database connections in your settings.php file. | |
// The $databases array is a two levels array with form ['key']['target']. | |
// 'key' reference to a database and 'target' set options added to 'default' for | |
// master/slave configurations. | |
// Default Database with key = default | |
$databases['default']['default'] = array ( | |
'database' => 'database_name', | |
'username' => 'database_user', | |
'password' => 'database_password', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set redis configuration. | |
*/ | |
/** @see: https://docs.platform.sh/frameworks/drupal8/redis.html */ | |
if (extension_loaded('redis')) { | |
// Set Redis as the default backend for any cache bin not otherwise specified. | |
// $settings['cache']['default'] = 'cache.backend.redis'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function MY_CUSTOM_MODULE_form_alter(&$form, $form_state, $form_id) { | |
//Initial set of the wanted view. | |
$view_names = ['name_of_view']; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic use of a Drupal route. | |
## Just declare a route, a Controller and a responsible method. | |
## file: module_name.routing.yml | |
------------------------------------------------------------- | |
hello_world.hello: | |
path: '/hello' | |
defaults: | |
_controller: '\Drupal\hello_world\Controller\HelloWorldController::helloWorld' | |
_title: 'Out First Route' | |
requirements: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: basic_migration_one | |
label: 'Custom Basic Migration 2000' | |
source: | |
plugin: embedded_data | |
data_rows: | |
- | |
unique_id: 1 | |
page_title: 'Title for migrated node - One' | |
page_content: 'Lorem fistrum mamaar se calle ustée tiene musho pelo.' | |
- |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,title,body,tags,image | |
1,Software Test Engineer III,"Etiam justo. Etiam pretium iaculis justo. In hac habitasse platea dictumst. Etiam faucibus cursus urna. Ut tellus. Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi. Cras non velit nec nisi vulputate nonummy.",6th generation,https://robohash.org/maximedoloret.png?size=50x50&set=set1 | |
2,Quality Control Specialist,"Duis aliquam convallis nunc. Proin at turpis a pede posuere nonummy. Integer non velit. Donec diam neque, vestibulum eget, vulputate ut, ultrices vel, augue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec pharetra, magna vestibulum aliquet ultrices, erat tortor sollicitudin mi, sit amet lobortis sapien sapien non mi. Integer ac neque. Duis bibendum. Morbi non quam nec dui luctus rutrum. Nulla tellus. In sagittis dui vel nisl. Duis ac nibh. Fusce lacus purus, aliquet at, feugiat non, pretium quis, lectus. Suspendisse potenti. In eleifend quam a odio. In hac habitasse platea dic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uuid: 1bcec3e7-0a49-4473-87a2-6dca09b91aba | |
langcode: en | |
status: true | |
dependencies: { } | |
id: article_csv_import | |
label: 'Migrating articles' | |
source: | |
plugin: csv | |
path: modules/custom/migration_csv_module/csv/migration_csv_articles.csv | |
delimiter: ',' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<php> | |
<!-- Set error reporting to E_ALL. --> | |
<ini name="error_reporting" value="32767"/> | |
<!-- Do not limit the amount of memory tests take to run. --> | |
<ini name="memory_limit" value="-1"/> | |
<!-- Example SIMPLETEST_BASE_URL value: http://localhost --> | |
<env name="SIMPLETEST_BASE_URL" value="http://migrations.ddev.site/"/> | |
<!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix --> | |
<env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/> | |
<!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_install(). | |
*/ | |
function MYMODULE_install() { | |
// Create new Bundle. | |
$bundle = new stdClass(); | |
$bundle->name = 'Test Bundle'; // user friendly label | |
$bundle->bundle = 'paragraphy_test'; // machine name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# must be unique in a given SonarQube instance | |
sonar.projectKey=ONE80WEB:ONE80WEB | |
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. | |
sonar.projectName=WEBSITE | |
sonar.projectVersion=1.0 | |
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | |
# This property is optional if sonar.modules is set. | |
sonar.sources=./web |