Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$map = \Drupal::entityManager()->getFieldMap();
dsm($map);
<?php
$defs = \Drupal::entityManager()->getFieldDefinitions('node', 'sponsor');
foreach ($defs as $def) {
\Drupal::entityManager()->onFieldDefinitionCreate($def);
}
@mikeyp

This comment has been minimized.

Copy link
Owner Author

@mikeyp mikeyp commented Jun 23, 2015

Building a Drupal 8 view and have missing fields? Check if they are in the field map, and have correct bundle data, and if not, run the snippet below for each entity/bundle type that needs updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment