abstract class RepositoryHandlerBase in Workspace 8.2
Defines a base RepositoryHandler plugin implementation.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\workspace\RepositoryHandlerBase implements RepositoryHandlerInterface uses DependencyTrait
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of RepositoryHandlerBase
See also
\Drupal\workspace\RepositoryHandlerInterface
\Drupal\workspace\RepositoryHandlerManager
\Drupal\workspace\Annotation\RepositoryHandler
1 file declares its use of RepositoryHandlerBase
- LiveRepositoryHandler.php in src/
Plugin/ RepositoryHandler/ LiveRepositoryHandler.php
File
- src/
RepositoryHandlerBase.php, line 16
Namespace
Drupal\workspaceView source
abstract class RepositoryHandlerBase extends PluginBase implements RepositoryHandlerInterface {
use DependencyTrait;
/**
* The source repository identifier.
*
* @var string
*/
protected $source;
/**
* The target repository identifier.
*
* @var string
*/
protected $target;
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
if (!isset($configuration['source'])) {
throw new \InvalidArgumentException('Missing repository handler source configuration');
}
if (!isset($configuration['target'])) {
throw new \InvalidArgumentException('Missing repository handler target configuration');
}
$this->source = $configuration['source'];
$this->target = $configuration['target'];
}
/**
* {@inheritdoc}
*/
public function getLabel() {
return $this
->getPluginDefinition()['label'];
}
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this
->getPluginDefinition()['description'];
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
return [];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
DependencyTrait:: |
protected | property | The object's dependencies. | |
DependencyTrait:: |
protected | function | Adds multiple dependencies. | |
DependencyTrait:: |
protected | function | Adds a dependency. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
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:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
RepositoryHandlerBase:: |
protected | property | The source repository identifier. | |
RepositoryHandlerBase:: |
protected | property | The target repository identifier. | |
RepositoryHandlerBase:: |
public | function | 1 | |
RepositoryHandlerBase:: |
public | function |
Returns the repository handler plugin description. Overrides RepositoryHandlerInterface:: |
|
RepositoryHandlerBase:: |
public | function |
Returns the label of the repository handler. Overrides RepositoryHandlerInterface:: |
|
RepositoryHandlerBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
1 |
RepositoryHandlerInterface:: |
public | function | Checks if there are any conflicts between the source and the target. | 2 |
RepositoryHandlerInterface:: |
constant | Indicate that an item deleted on the source has been changed on the target. | ||
RepositoryHandlerInterface:: |
constant | Indicate that an item has been updated both on the source and the target. | ||
RepositoryHandlerInterface:: |
constant | Indicate that an item updated on the source has been deleted on the target. | ||
RepositoryHandlerInterface:: |
public | function | Gets the revision identifiers for items which have changed on the source. | 2 |
RepositoryHandlerInterface:: |
public | function | Gets the revision identifiers for items which have changed on the target. | 2 |
RepositoryHandlerInterface:: |
public | function | Gets the total number of items which have changed on the source. | 2 |
RepositoryHandlerInterface:: |
public | function | Gets the total number of items which have changed on the target. | 2 |
RepositoryHandlerInterface:: |
public | function | Pulls content from a target repository to a source repository. | 2 |
RepositoryHandlerInterface:: |
public | function | Pushes content from a source repository to a target repository. | 2 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |