Skip to content

Instantly share code, notes, and snippets.

View fago's full-sized avatar

Wolfgang Ziegler fago

View GitHub Profile
diff --git a/dotenv/loader.php b/dotenv/loader.php
index 8892c11..3399685 100644
--- a/dotenv/loader.php
+++ b/dotenv/loader.php
@@ -227,15 +227,18 @@ public static function getSiteVariables($site = NULL, $site_variant = '') {
// The following process must follow the same logic as loader.sh, but instead
// evaluating .env content with bash we use dotenv to parse it.
$dotenv = new Dotenv();
- $dotenv->populate($dotenv->parse(PhappEnvironmentLoader::getDotenvFiles()));
- $dotenv->populate($dotenv->parse(PhappEnvironmentLoader::determineEnvironment()));
@fago
fago / 1.patch
Created January 15, 2022 16:53
#3246958
From c351ed55488c7a276a9e3be04ccf1b8276ae17d1 Mon Sep 17 00:00:00 2001
From: MilanG <[email protected]>
Date: Mon, 1 Nov 2021 10:53:08 +0100
Subject: [PATCH] Changing protocol HTTP -> HTTPS for YouTube remote thumbnail
image path.
---
src/Plugin/video_embed_field/Provider/YouTube.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@fago
fago / 1602.patch
Created January 15, 2022 16:50
Issue #3256828
From eda221fddcff4f97fb921e7889b7ac89ee8357f0 Mon Sep 17 00:00:00 2001
From: acbramley <[email protected]>
Date: Tue, 4 Jan 2022 00:58:31 +0000
Subject: [PATCH] Escape pipe characters in regex
---
core/modules/media/src/OEmbed/Endpoint.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/modules/media/src/OEmbed/Endpoint.php b/core/modules/media/src/OEmbed/Endpoint.php
@fago
fago / ldp-core--ldp-990-off-canvas-dialog-width.patch
Last active October 11, 2021 21:53
Patch off-canvas dialog with.
Index: lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php b/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
--- a/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
+++ b/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php (date 1633988933771)
@@ -57,6 +57,8 @@
if (!isset($this->dialogOptions['width'])) {
@fago
fago / CustomElementsFormController.php
Last active September 30, 2021 13:29
example for rendering form for WV
class CustomElementsFormController extends HtmlFormController {
/**
* {@inheritDoc}
*/
public function getContentResult(Request $request, RouteMatchInterface $route_match) {
$form = parent::getContentResult($request, $route_match);
return $this->getCustomElementsContentResult($form);
}
/**
* Implements hook_prepprocess_TEMPLATE for the "node" template.
*/
function recipes_preprocess_node(&$variables) {
// Add your changes here.
// Add cacheability metadata to ensure config changes are reflected.
$cache_extras = [];
\Drupal\Core\Render\BubbleableMetadata::createFromObject($config)
<?php
namespace Drupal\module\Plugin\Block;
use Drupal\contextual_views\Plugin\Block\ContextualViewsBlock;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\NodeInterface;
/**
* Provides a 'NewsByChannel' block.
@fago
fago / empty.js
Created March 7, 2017 09:46
Empty javascript file
// This file is empty.
<?php
namespace drunomics\Composer;
use Composer\Script\Event;
use Composer\Util\StreamContextFactory;
use Symfony\Component\Filesystem\Filesystem;
/**
* Scripthandler for installing (development) tools.
@fago
fago / libraries
Last active November 23, 2016 14:30
$libraries_page_state = [ 'drupal/jquery' ];
$attachment_changes =
[
'drupal/jquery' => [
'commands' => [
'jquery-file1-command', 'jquery-file2-command',
],
],
# Depends on jquery