Skip to content

Instantly share code, notes, and snippets.

alexpott

Block or report user

Report or block alexpott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View drupal.org.css
/* Inspired by Bohjan's style */
.container-12 {
min-width: 1200px !important;
}
#header-screen {
display: none;
}
section.comments > div.comment .permalink-wrapper {
float: left;
@alexpott
alexpott / quick-drupal.sh
Last active May 3, 2018
A new quick way to start drupalling on a local install. You need git and PHP (>5.5.9)
View quick-drupal.sh
curl -sS https://ftp.drupal.org/files/projects/drupal-8.6.x-dev.zip --output drupal.zip
unzip drupal.zip
cd drupal-8.6.x-dev
php ./core/scripts/drupal quick-start
View gist:8e5c86cd75ae235534be9ff0cb527273
Verifying my Blockstack ID is secured with the address 15CDdYjXMqbAnRqN7dwdT5pp9PEAeM1UxT https://explorer.blockstack.org/address/15CDdYjXMqbAnRqN7dwdT5pp9PEAeM1UxT
View gist:0930c476f078427897354cb7e0f066ac
<?php
namespace Drupal\custom_migration\Plugin\migrate\process;
use Drupal\Component\Utility\Html;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
/**
@alexpott
alexpott / settings.local.php
Last active Nov 14, 2016 — forked from jacine/settings.local.php
settings.local.php
View settings.local.php
<?php
/**
* @file
* Local development override configuration feature.
*
* To activate this feature, copy and rename it such that its path plus
* filename is 'sites/default/settings.local.php'. Then, go to the bottom of
* 'sites/default/settings.php' and uncomment the commented lines that mention
* 'settings.local.php'.
View profile.install
<?php
/**
* @file
* Install, update and uninstall functions for my project.
*/
/**
* Implements hook_install().
*
View profile,install
<?php
/**
* @file
* Install, update and uninstall functions for my project.
*/
/**
* Implements hook_install().
*
View gist:60663b978fb912b6c84d
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index d749734..f185573 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -23,7 +23,6 @@
use Drupal\Core\Field\FieldStorageDefinitionEvents;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\Field\FieldStorageDefinitionListenerInterface;
-use Drupal\Core\KeyValueStore\KeyValueFactory;
use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
View gist:5353638
So I think that we're breaking an important principle here... that config should return the data in an identical format to what you provided. At Barcelona @merlinofchaos said that CMI should be a dumb as possible and I think that here we are breaking that maxim.
Just because FAPI returns everything as strings is not a reason to go ahead here. We can leave all the simple config as strings if we want or we can use the schema (if available) to save typed config. But config entities should be allowed to save their data in the types stored on the object.
View gist:5247940
<?php
$context = new \Drupal\Core\Config\Context\ConfigContext($this->event_dispatcher);
$context->set('locale.language', WHATEVER_LANGCODE);
$this->configFactory->enterContext($context);
You can’t perform that action at this time.