Created
February 7, 2017 16:18
-
-
Save vijaycs85/83824c48dac6daae617f9492b43f3a15 to your computer and use it in GitHub Desktop.
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 | |
$storage = $this->entityManager->getStorage($entity_type); | |
$ids = $storage->getQuery() | |
->condition('type', $type) | |
->execute(); | |
$entities = $storage->loadMultiple($ids); | |
// Load the entities. | |
foreach ($entities as $entity) { | |
$entity->[field name] = $value; | |
$entity->save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment