abstract class WrapperPluginBase in Backup and Migrate 5.0.x
A base class for a Drupal source or destination wrapper plugin.
@package Drupal\backup_migrate\Drupal\EntityPlugins
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\backup_migrate\Drupal\EntityPlugins\WrapperPluginBase implements WrapperPluginInterface
 
 
Expanded class hierarchy of WrapperPluginBase
File
- src/
Drupal/ EntityPlugins/ WrapperPluginBase.php, line 14  
Namespace
Drupal\backup_migrate\Drupal\EntityPluginsView source
abstract class WrapperPluginBase extends PluginBase implements WrapperPluginInterface {
  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this
      ->setConfiguration($configuration);
  }
  /**
   * Get the Backup and Migrate plugin object.
   *
   * @return Drupal\backup_migrate\Core\Plugin\PluginInterface
   */
  public function getObject() {
    // If the class to wrap was specified in the annotation then add that class.
    $info = $this
      ->getPluginDefinition();
    if ($info['wrapped_class']) {
      return new $info['wrapped_class']($this
        ->getConfig());
    }
  }
  /**
   * {@inheritdoc}
   */
  public abstract function alterBackupMigrate(BackupMigrateInterface $bam, $key, array $options = []);
  /**
   * {@inheritdoc}
   */
  public function getConfiguration() {
    return $this->configuration;
  }
  /**
   * {@inheritdoc}
   */
  public function setConfiguration(array $configuration) {
    $this->configuration = $configuration;
  }
  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [];
  }
  /**
   * {@inheritdoc}
   */
  public function calculateDependencies() {
    return [];
  }
  /**
   * Return a Backup and Migrate Config object with the plugin configuration.
   *
   * @return \Drupal\backup_migrate\Core\Config\Config
   */
  public function getConfig() {
    return new Config($this
      ->getConfiguration());
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            PluginBase:: | 
                  protected | property | Configuration information passed into the plugin. | 1 | 
| 
            PluginBase:: | 
                  protected | property | The plugin implementation definition. | 1 | 
| 
            PluginBase:: | 
                  protected | property | The plugin_id. | |
| 
            PluginBase:: | 
                  constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
| 
            PluginBase:: | 
                  public | function | 
            Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: | 
                  |
| 
            PluginBase:: | 
                  public | function | 
            Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: | 
                  |
| 
            PluginBase:: | 
                  public | function | 
            Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: | 
                  2 | 
| 
            PluginBase:: | 
                  public | function | 
            Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: | 
                  |
| 
            PluginBase:: | 
                  public | function | Determines if the plugin is configurable. | |
| 
            WrapperPluginBase:: | 
                  abstract public | function | 
            Alter the backup_migrate object to add the source and required services. Overrides WrapperPluginInterface:: | 
                  2 | 
| 
            WrapperPluginBase:: | 
                  public | function | 
            Calculates dependencies for the configured plugin. Overrides DependentPluginInterface:: | 
                  |
| 
            WrapperPluginBase:: | 
                  public | function | 
            Gets default configuration for this plugin. Overrides ConfigurableInterface:: | 
                  |
| 
            WrapperPluginBase:: | 
                  public | function | Return a Backup and Migrate Config object with the plugin configuration. | |
| 
            WrapperPluginBase:: | 
                  public | function | 
            Gets this plugin's configuration. Overrides ConfigurableInterface:: | 
                  |
| 
            WrapperPluginBase:: | 
                  public | function | Get the Backup and Migrate plugin object. | 2 | 
| 
            WrapperPluginBase:: | 
                  public | function | 
            Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: | 
                  |
| 
            WrapperPluginBase:: | 
                  public | function | 
            Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |