Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /**
  2. * List of brands
  3. *
  4. * @return array
  5. */
  6. public function listAction()
  7. {
  8. $brandIds = Drupal::entityQuery('node')
  9. ->condition('type', 'brand')
  10. ->sort('title', 'asc')
  11. ->execute();
  12.  
  13. return [
  14. 'addition_arguments' => [
  15. '#theme' => 'page--brands',
  16. '#brands' => is_array($brandIds) ? Node::loadMultiple($brandIds) : [],
  17. '#brands_filter' => Drupal::config('field.storage.node.field_brand_categories')->get()
  18. ]
  19. ];
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement