abstract class DataPolicyExportPluginBase in Data Policy 8
Base class for Data Policy export plugin plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\data_policy_export\Plugin\DataPolicyExportPluginBase implements ContainerFactoryPluginInterface, DataPolicyExportPluginInterface uses StringTranslationTrait
Expanded class hierarchy of DataPolicyExportPluginBase
File
- modules/
data_policy_export/ src/ Plugin/ DataPolicyExportPluginBase.php, line 17
Namespace
Drupal\data_policy_export\PluginView source
abstract class DataPolicyExportPluginBase extends PluginBase implements DataPolicyExportPluginInterface, ContainerFactoryPluginInterface {
use StringTranslationTrait;
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
public $entityTypeManager;
/**
* The date formatter.
*
* @var \Drupal\Core\Datetime\DateFormatterInterface
*/
public $dateFormatter;
/**
* The database.
*
* @var \Drupal\Core\Database\Connection
*/
public $database;
/**
* UserExportPluginBase constructor.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter.
* @param \Drupal\Core\Database\Connection $database
* The database connection.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, DateFormatterInterface $date_formatter, Connection $database) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entity_type_manager;
$this->dateFormatter = $date_formatter;
$this->database = $database;
}
/**
* The create method.
*
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* Container interface.
* @param array $configuration
* An array of configuration.
* @param string $plugin_id
* The plugin id.
* @param mixed $plugin_definition
* The plugin definition.
*
* @return \Drupal\Core\Plugin\ContainerFactoryPluginInterface|\Drupal\data_policy_export\Plugin\DataPolicyExportPluginBase
* Returns the DataPolicyExportPluginBase.
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('entity_type.manager'), $container
->get('date.formatter'), $container
->get('database'));
}
/**
* Returns the header.
*
* @return \Drupal\Core\StringTranslation\TranslatableMarkup|string
* The header.
*/
public function getHeader() {
return '';
}
/**
* Returns the value.
*
* @param \Drupal\data_policy\Entity\DataPolicyInterface $entity
* The Data Policy entity to get the value from.
*
* @return string
* The value.
*/
public function getValue(DataPolicyInterface $entity) {
return '';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DataPolicyExportPluginBase:: |
public | property | The database. | |
DataPolicyExportPluginBase:: |
public | property | The date formatter. | |
DataPolicyExportPluginBase:: |
public | property | The entity type manager. | |
DataPolicyExportPluginBase:: |
public static | function |
The create method. Overrides ContainerFactoryPluginInterface:: |
|
DataPolicyExportPluginBase:: |
public | function |
Returns the header. Overrides DataPolicyExportPluginInterface:: |
|
DataPolicyExportPluginBase:: |
public | function |
Returns the value. Overrides DataPolicyExportPluginInterface:: |
|
DataPolicyExportPluginBase:: |
public | function |
UserExportPluginBase constructor. Overrides PluginBase:: |
|
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. | |
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. |