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
| # If the values change the hash needs to be fixed. | |
| drush eval '$r=\Drupal::entityQuery("redirect")->execute(); $x=\Drupal\redirect\Entity\Redirect::loadMultiple($r); foreach($x as $y) { $y->save(); }' |
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
| for t in $(drush sqlq "show tables"); do echo $(drush sqlq "SELECT '$t' n, COUNT(*) r FROM $t") ; done |
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
| version: '2.3' | |
| services: | |
| cli: | |
| volumes: | |
| - ./custom/modules:/app/web/sites/default/modules/local:${VOLUME_FLAGS:-delegated} | |
| test: | |
| volumes: | |
| - ./custom/modules:/app/web/sites/default/modules/local:${VOLUME_FLAGS:-delegated} |
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
| # You can copy/paste this command into your terminal. | |
| echo "Check your GovCMS developer tools:" \ | |
| && git --version \ | |
| && docker --version \ | |
| && docker-compose --version \ | |
| && pygmy --version \ | |
| && echo "Ahoy "$(ahoy --version) | |
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
| See https://lilengine.co/articles/example-settings-php-drupal-8 | |
| File structure in sites/default/... | |
| - settings.php | |
| - includes/ | |
| --- default.settings.php | |
| --- default.services.yml | |
| --- lando.settings.php | |
| --- lando.services.yml |
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
| #!/usr/bin/env bash | |
| # Pushed into the container by .lando.yml | |
| alias phpunit=/app/vendor/bin/phpunit |
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 | |
| print "\n\nSERVER HEADERS:\n\n"; | |
| print(var_export($_SERVER, TRUE)); | |
| print "\n\nSymfony HTTP Foundation request headers:\n\n"; | |
| $request = \Drupal::request(); | |
| foreach ($request->headers->all() as $key => $header) { | |
| print $key . ': ' . $header[0] . "\n"; | |
| } |
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 | |
| namespace Drupal\MYMODULE\Plugin\jsonapi\FieldEnhancer; | |
| use Drupal\Core\Entity\EntityTypeManagerInterface; | |
| use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | |
| use Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerBase; | |
| use Shaper\Util\Context; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| use Drupal\Core\Url; |
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 | |
| namespace Drupal\PROJECT\Plugin\search_api\processor; | |
| use Drupal\search_api\Datasource\DatasourceInterface; | |
| use Drupal\search_api\Item\ItemInterface; | |
| use Drupal\search_api\Processor\ProcessorPluginBase; | |
| use Drupal\search_api\Processor\ProcessorProperty; | |
| /** |
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 | |
| namespace Drupal\PROJECT\Plugin\search_api\processor; | |
| use Drupal\search_api\Datasource\DatasourceInterface; | |
| use Drupal\search_api\Item\ItemInterface; | |
| use Drupal\search_api\Processor\ProcessorPluginBase; | |
| use Drupal\search_api\Processor\ProcessorProperty; | |
| /** |