Created
June 7, 2020 03:22
-
-
Save crittermike/7233a55079cd112d51d44ce0d1939ec6 to your computer and use it in GitHub Desktop.
Revisions
-
crittermike revised this gist
Jun 7, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ <?php $query = \Drupal::entityQuery('node'); $ids = $query->accessCheck(FALSE)->execute(); $storage_handler = \Drupal::entityTypeManager()->getStorage('node'); -
crittermike created this gist
Jun 7, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ $query = \Drupal::entityQuery('node'); $ids = $query->accessCheck(FALSE)->execute(); $storage_handler = \Drupal::entityTypeManager()->getStorage('node'); // If you have a lot of nodes, you may have to split this up via // array_chunk() instead of trying to load all nodes at one time. $entities = $storage_handler->loadMultiple($ids); foreach ($entities as $entity) { taxonomy_build_node_index($entity); }