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
Fatal error: Uncaught exception 'Exception' with message 'The configuration directory type <em class="placeholder">active</em> does not exist.' in /Users/alex/dev/sites/drupal8alt.dev/core/includes/bootstrap.inc on line 496 | |
Exception: The configuration directory type <em class="placeholder">active</em> does not exist. in /Users/alex/dev/sites/drupal8alt.dev/core/includes/bootstrap.inc on line 496 | |
Call Stack: | |
0.0004 709584 1. {main}() /Users/alex/dev/drush5/drush.php:0 | |
0.0152 5153000 2. drush_main() /Users/alex/dev/drush5/drush.php:14 | |
0.0608 12112608 3. _drush_bootstrap_and_dispatch() /Users/alex/dev/drush5/drush.php:59 | |
0.0779 12123136 4. drush_dispatch() /Users/alex/dev/drush5/drush.php:90 | |
0.1052 12142080 5. call_user_func_array() /Users/alex/dev/drush5/includes/command.inc:165 |
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
function hook_field_attach_purge(\Drupal\Core\Entity\EntityInterface $entity, $field, $instance) { | |
// find the corresponding data in mymodule and purge it | |
- if ($entity->entityType() == 'node' && $field->field_name == 'my_field_name') { | |
+ if ($entity->entityType() == 'node' && $field['field_name'] == 'my_field_name') { | |
mymodule_remove_mydata($entity->nid); | |
} | |
} |
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
+function field_create_field(array $field) { | |
+ $field = entity_create('field_entity', $field); | |
+ $field->save(); | |
return $field; | |
} |
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 | |
$context = new \Drupal\Core\Config\Context\ConfigContext($this->event_dispatcher); | |
$context->set('locale.language', WHATEVER_LANGCODE); | |
$this->configFactory->enterContext($context); |
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
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. |
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/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; |
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 | |
/** | |
* @file | |
* Install, update and uninstall functions for my project. | |
*/ | |
/** | |
* Implements hook_install(). | |
* |
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 | |
/** | |
* @file | |
* Install, update and uninstall functions for my project. | |
*/ | |
/** | |
* Implements hook_install(). | |
* |
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 | |
/** | |
* @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'. |
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 | |
namespace Drupal\custom_migration\Plugin\migrate\process; | |
use Drupal\Component\Utility\Html; | |
use Drupal\migrate\ProcessPluginBase; | |
use Drupal\migrate\MigrateExecutableInterface; | |
use Drupal\migrate\Row; | |
/** |
OlderNewer