You are here

function filebrowser_node_insert in Filebrowser 8.2

Same name and namespace in other branches
  1. 3.x filebrowser.module \filebrowser_node_insert()

Implements hook_ENTITY_TYPE_insert().

Parameters

Drupal\node\NodeInterface $node:

File

./filebrowser.module, line 175

Code

function filebrowser_node_insert(NodeInterface $node) {
  if ($node
    ->bundle() == 'dir_listing') {
    $node->filebrowser->nid = $node
      ->id();
    $manager = \Drupal::service('filebrowser.manager');
    $manager
      ->updateFilebrowser($node->filebrowser, 'insert');
  }
}