You are here

public function FilebrowserStorage::updateContentField in Filebrowser 3.x

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

Parameters

string $key name of the key column:

mixed $key_value:

string $field_name Field who's value to change:

mixed $value New value:

Return value

\Drupal\Core\Database\StatementInterface|int|null

File

src/Services/FilebrowserStorage.php, line 153

Class

FilebrowserStorage

Namespace

Drupal\filebrowser\Services

Code

public function updateContentField($key, $key_value, $field_name, $value) {
  return $this->connection
    ->update('filebrowser_content')
    ->fields([
    $field_name => $value,
  ])
    ->condition($key, $key_value, '=')
    ->execute();
}