SHARE
TWEET

Untitled

a guest Jan 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_modul_node_view($node, $view_mode, $langcode) {
  2.     global $user;
  3.     switch ($node->vid) {
  4.     case 4:
  5.         $node2 = node_load(37);
  6.         if ($user->uid > 0) {
  7.             $node->content['my_data_field'] = array(
  8.                 '#markup' => drupal_render($node2),
  9.                 '#weight' => 10,
  10.             );  
  11.         }
  12.     }
  13. }
  14.    
  15. Fatal error: Cannot use object of type stdClass as array
  16.    
  17. $form = drupal_get_form('user_login', $node);
  18.     $node->content['data_collection_form'] = array(
  19.         '#markup' => drupal_render($form),
  20.         '#weight' => 10,
  21.     );
  22.    
  23. $node->content['my_data_field'] = array(
  24.   '#markup' => drupal_render(node_view($node)),
  25.   '#weight' => 10,
  26. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top