protected function ConfigImporter::getNextConfigurationOperation

protected ConfigImporter::getNextConfigurationOperation()

Gets the next configuration operation to perform.

Return value

array|bool An array containing the next operation and configuration name to perform it on. If there is nothing left to do returns FALSE;

File

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

Class

ConfigImporter
Defines a configuration importer.

Namespace

Drupal\Core\Config

Code

protected function getNextConfigurationOperation() {
  // The order configuration operations is processed is important. Deletes
  // have to come first so that recreates can work.
  foreach ($this->storageComparer->getAllCollectionNames() as $collection) {
    foreach (array('delete', 'create', 'rename', 'update') as $op) {
      $config_names = $this->getUnprocessedConfiguration($op, $collection);
      if (!empty($config_names)) {
        return array(
          'op' => $op,
          'name' => array_shift($config_names),
          'collection' => $collection,
        );
      }
    }
  }
  return FALSE;
}

© 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::getNextConfigurationOperation/8.1.x