You are here

public function StatusYoutube::generateNode in Heartbeat 8

File

modules/statusmessage/src/StatusYoutube.php, line 37

Class

StatusYoutube

Namespace

Drupal\statusmessage

Code

public function generateNode() {
  if ($this
    ->generateRequest()) {
    $node = $this
      ->setNodeData();
    $this
      ->processTerms();
    if ($node
      ->save()) {
      return $node
        ->id();
    }
  }
  return null;
}