StorageTransformEvent.php

Same filename in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/StorageTransformEvent.php
  2. 10 core/lib/Drupal/Core/Config/StorageTransformEvent.php
  3. 11.x core/lib/Drupal/Core/Config/StorageTransformEvent.php

Namespace

Drupal\Core\Config

File

core/lib/Drupal/Core/Config/StorageTransformEvent.php

View source
<?php

namespace Drupal\Core\Config;

use Drupal\Component\EventDispatcher\Event;

/**
 * Class StorageTransformEvent.
 *
 * This event allows subscribers to alter the configuration of the storage that
 * is being transformed.
 */
class StorageTransformEvent extends Event {
    
    /**
     * The configuration storage which is transformed.
     *
     * This storage can be interacted with by event subscribers and will be
     * used instead of the original storage after all event subscribers have been
     * called.
     *
     * @var \Drupal\Core\Config\StorageInterface
     */
    protected $storage;
    
    /**
     * StorageTransformEvent constructor.
     *
     * @param \Drupal\Core\Config\StorageInterface $storage
     *   The storage with the configuration to transform.
     */
    public function __construct(StorageInterface $storage) {
        $this->storage = $storage;
    }
    
    /**
     * Returns the mutable storage ready to be read from and written to.
     *
     * @return \Drupal\Core\Config\StorageInterface
     *   The config storage.
     */
    public function getStorage() {
        return $this->storage;
    }

}

Classes

Title Deprecated Summary
StorageTransformEvent Class StorageTransformEvent.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.