abstract class FeedHandlerBase in Feeds 8.3
Provides a base class for entity handlers.
Hierarchy
- class \Drupal\feeds\FeedHandlerBase implements EntityHandlerInterface uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait, EventDispatcherTrait
Expanded class hierarchy of FeedHandlerBase
1 file declares its use of FeedHandlerBase
- FeedHandlerBaseTest.php in tests/
src/ Unit/ FeedHandlerBaseTest.php
File
- src/
FeedHandlerBase.php, line 17
Namespace
Drupal\feedsView source
abstract class FeedHandlerBase implements EntityHandlerInterface {
use DependencySerializationTrait;
use EventDispatcherTrait;
use MessengerTrait;
use StringTranslationTrait;
/**
* Constructs a new FeedHandlerBase object.
*
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public function __construct(EventDispatcherInterface $event_dispatcher) {
$this
->setEventDispatcher($event_dispatcher);
}
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static($container
->get('event_dispatcher'));
}
/**
* Adds a new batch.
*
* @param array $batch_definition
* An associative array defining the batch.
*/
protected function batchSet(array $batch_definition) {
return batch_set($batch_definition);
}
}
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 | |
EventDispatcherTrait:: |
private | property | The event dispatcher service. | |
EventDispatcherTrait:: |
protected | function | Dispatches an event. | |
EventDispatcherTrait:: |
protected | function | Returns the event dispatcher service. | |
EventDispatcherTrait:: |
public | function | Sets the event dispatcher service to use. | |
FeedHandlerBase:: |
protected | function | Adds a new batch. | |
FeedHandlerBase:: |
public static | function |
Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface:: |
|
FeedHandlerBase:: |
public | function | Constructs a new FeedHandlerBase object. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
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. |