Skip to main content
added 263 characters in body
Source Link
Maouna
  • 1.2k
  • 8
  • 11

There are brackets missing:

$nids = $query->execute();

In my block this works:

 public function build() {
   $query = \Drupal::entityQuery('node');
   $nids = $query->execute();

  $build = [
   '#theme' => 'item_list',
   '#items' => $nids,
  ];

 return $build;
}

There are brackets missing:

$nids = $query->execute();

There are brackets missing:

$nids = $query->execute();

In my block this works:

 public function build() {
   $query = \Drupal::entityQuery('node');
   $nids = $query->execute();

  $build = [
   '#theme' => 'item_list',
   '#items' => $nids,
  ];

 return $build;
}
Source Link
Maouna
  • 1.2k
  • 8
  • 11

There are brackets missing:

$nids = $query->execute();