You are here

public function DBManager::insert in Content Export YAML 8

1 call to DBManager::insert()
DBManager::load_exported_all in modules/manager_content_export_yaml/src/DBManager.php

File

modules/manager_content_export_yaml/src/DBManager.php, line 49

Class

DBManager

Namespace

Drupal\content_export_yaml

Code

public function insert($fields) {
  $return_value = NULL;
  try {
    $return_value = $this->database
      ->insert('content_export_yaml')
      ->fields($fields)
      ->execute();
  } catch (Exception $e) {
    \Drupal::messenger()
      ->addMessage(t('db_insert failed. Message = %message, query= %query', array(
      '%message' => $e
        ->getMessage(),
      '%query' => $e->query_string,
    )), 'error');
  }
  return $return_value;
}