Skip to content

Instantly share code, notes, and snippets.

@oskarcalvo
Created January 19, 2017 14:21
Show Gist options
  • Save oskarcalvo/b029d92cf535cffd9d9bd126f96de6cf to your computer and use it in GitHub Desktop.
Save oskarcalvo/b029d92cf535cffd9d9bd126f96de6cf to your computer and use it in GitHub Desktop.
<?php
$query = \Drupal::entityQuery('cub');
$result = $query->execute();
$entidades = function ($result){
$list = [];
foreach($result as $cub) {
$list[] = $cub;
}
return $list;
};
// object $entidad con todas los registros guardasdos de cub
$entidad = entity_load_multiple('cub', $entidades($result));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment