This file contains 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
diff --git a/core/modules/contact/src/ContactFormEditForm.php b/core/modules/contact/src/ContactFormEditForm.php | |
index 098ba2f..0442bf6 100644 | |
--- a/core/modules/contact/src/ContactFormEditForm.php | |
+++ b/core/modules/contact/src/ContactFormEditForm.php | |
@@ -68,10 +68,10 @@ public function form(array $form, FormStateInterface $form_state) { | |
if ($url = $contact_form->getRedirectUrl()) { | |
$path = $url->toString(); | |
} | |
- $form['route'] = array( | |
+ $form['url'] = array( |
This file contains 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
#!/bin/bash | |
# This has to be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin | |
# Remove local fully merged branches | |
git branch --merged master | grep -v 'master$' | xargs git branch -d |
This file contains 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
; generates interdiff into ~/patches from current diff | |
alias.interdiff=!git diff > ~/patches/interdiff.txt | |
; generates interdiff into ~/patches from current staged diff | |
alias.interdiff-stg=!git diff --staged > ~/patches/interdiff.txt | |
; generates patch into ~/patches based on branch name. | |
; usage git genpatch {comment number} | |
alias.genpatch=!sh -c "br=`git symbolic-ref HEAD|sed s#refs/heads/##`; git diff origin/8.0.x > ~/patches/\${br}.$1.patch" | |
; rebase branch of 8.0.x | |
alias.rebase8x=!git fetch origin && git rebase origin/8.0.x | |
; merge 8.0.x |
This file contains 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 | |
/** | |
* Place the views exposed search block. | |
*/ | |
function YOURPROFILE_update_7001() { | |
$default_theme = variable_get('theme_default', 'YOURTHEME'); | |
// Enable some standard blocks. | |
$blocks = array( | |
array( | |
'module' => 'views', |
This file contains 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_preprocess_HOOK() for your_layout(). | |
*/ | |
function your_theme_preprocess_your_layout(&$vars) { | |
// Note this only works for 'defaults'. You could adapt it for OverridesSectionStorage. | |
// Ascertain if we're in layout-builder edit mode. | |
$parameters = \Drupal::routeMatch()->getParameters(); | |
$vars['is_layout_builder'] = FALSE; | |
$cache = new CacheableMetadata(); |
This file contains 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
/** | |
* Create a missing block (with empty fields but matching UUID). | |
*/ | |
function yourmodule_post_update_create_a_missing_block() { | |
$block_entity_manager = \Drupal::service('entity.manager')->getStorage('block_content'); | |
$missing_uuid = 'CE7DA6B0-C2A0-4EE9-8F6B-8854A3705FB7'; | |
$block = $block_entity_manager->create([ | |
'info' => 'Block title goes here', | |
'type' => 'block_type_machine_name_here', |
This file contains 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 | |
class SomeClass extends BlockBase { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getCacheContexts() { | |
$contexts = parent::getCacheContexts(); | |
// Tell Drupal that this block should be cached per-user. | |
$contexts[] = 'user'; |
This file contains 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" | |
services: | |
mariadb: | |
image: wodby/mariadb:10.1-2.3.5 | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: drupal | |
MYSQL_USER: drupal | |
MYSQL_PASSWORD: drupal |
This file contains 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" | |
services: | |
mariadb: | |
image: wodby/drupal-mariadb:1.0.0 | |
environment: | |
MYSQL_RANDOM_ROOT_PASSWORD: 1 | |
MYSQL_DATABASE: local | |
MYSQL_USER: drupal | |
MYSQL_PASSWORD: drupal |
This file contains 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
diff --git a/core/modules/block_content/block_content.install b/core/modules/block_content/block_content.install | |
index 6af2ac4e8f..c6556e719c 100644 | |
--- a/core/modules/block_content/block_content.install | |
+++ b/core/modules/block_content/block_content.install | |
@@ -6,6 +6,23 @@ | |
*/ | |
use Drupal\Core\Field\BaseFieldDefinition; | |
+use Drupal\Core\StringTranslation\TranslatableMarkup; | |
+ |
NewerOlder