Advertisement
Guest User

Untitled

a guest
Jun 13th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. return [
  2. '#theme' => 'webservices_client',
  3. '#id' => $infos_clients->body->id,
  4. '#nom' => $infos_clients->body->nom,
  5. ];
  6.  
  7. Array
  8. (
  9. [0] => stdClass Object
  10. (
  11. [numero] => 625
  12. [dateDebut] => 2018-09-27T09:21:54.5746973
  13. )
  14.  
  15. [1] => stdClass Object
  16. (
  17. [numero] => 468
  18. [dateDebut] => 2018-05-17T16:50:33.6357383
  19. )
  20.  
  21. )
  22.  
  23. return [
  24. '#theme' => 'webservices_informations',
  25. '#myvariable' => $response,
  26. ];
  27.  
  28. function webservices_informations_theme(array $existing, $type, $theme, $path) {
  29. return array(
  30. 'webservices_informations' => array(
  31. 'variables' => array(
  32. 'myvariable' => NULL,
  33. ),
  34. ),
  35. );
  36. }
  37.  
  38. {% for key, value in myvariable %}
  39. Key : {{ key }}<br>
  40. Name : {{ value.id }}<br>
  41. {% endfor %
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement