ConfigImporter::processConfiguration

protected ConfigImporter::processConfiguration($collection, $op, $name)

Processes a configuration change.

Parameters

string $collection: The configuration collection to process changes for.

string $op: The change operation.

string $name: The name of the configuration to process.

Throws

\Exception Thrown when the import process fails, only thrown when no importer log is set, otherwise the exception message is logged and the configuration is skipped.

File

core/lib/Drupal/Core/Config/ConfigImporter.php, line 752

Class

ConfigImporter
Defines a configuration importer.

Namespace

Drupal\Core\Config

Code

protected function processConfiguration($collection, $op, $name) {
  try {
    $processed = FALSE;
    if ($collection == StorageInterface::DEFAULT_COLLECTION) {
      $processed = $this->importInvokeOwner($collection, $op, $name);
    }
    if (!$processed) {
      $this->importConfig($collection, $op, $name);
    }
  }
  catch (\Exception $e) {
    $this->logError($this->t('Unexpected error during import with operation @op for @name: @message', array('@op' => $op, '@name' => $name, '@message' => $e->getMessage())));
    // Error for that operation was logged, mark it as processed so that
    // the import can continue.
    $this->setProcessedConfiguration($collection, $op, $name);
  }
}
doc_Drupal
2016-10-29 08:53:41
Comments
Leave a Comment

Please login to continue.