ConfigImporter::processConfiguration

protected function 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);
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!ConfigImporter.php/function/ConfigImporter::processConfiguration/8.1.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部