Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $node = DrupalnodeEntityNode::create([
- 'type' => 'issue',
- 'title' => $title,
- 'body' => $body,
- 'field_issue_category' => $term,
- 'field_issue_type' => 'publication',
- 'field_pub_id' => [
- 'target_id' => $publication_id,
- ],
- 'field_issue_group' => $group_id,
- 'field_date' => $date,
- ]);
- $node->save();
- $nid = $node->id();
- $title = preg_replace("/[s_]/", "-", $title);
- $path = Drupal::service('path.alias_storage')->save('/node/'.$nid, '/mypath/'.$title);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement