You are here

public function FilebrowserStorage::updateRootContentField in Filebrowser 3.x

Same name and namespace in other branches
  1. 8.2 src/Services/FilebrowserStorage.php \Drupal\filebrowser\Services\FilebrowserStorage::updateRootContentField()

File

src/Services/FilebrowserStorage.php, line 161

Class

FilebrowserStorage

Namespace

Drupal\filebrowser\Services

Code

public function updateRootContentField($nid, $old_root, $new_root) {
  return $this->connection
    ->update('filebrowser_content')
    ->fields([
    'root' => $new_root,
  ])
    ->condition('nid', $nid, '=')
    ->condition('root', $old_root, '=')
    ->execute();
}