123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace Drupal\reinstall;
- use Drupal\Core\Entity\EntityStorageInterface;
- use Symfony\Component\EventDispatcher\Event;
- /**
- * Wraps a dump event for event listeners.
- *
- * @see \Drupal\reinstall\DumperEvents::REINSTALL_SERIALIZE_POST
- * @see \Drupal\reinstall\DumperEvents::SERIALIZE_PRE
- */
- class DumperEvent extends Event {
- /**
- * @var string
- */
- public $bundleName;
- /**
- * @var \Drupal\Core\Entity\EntityInterface[]
- */
- public $entities = [];
- /**
- * @var \Drupal\Core\Entity\EntityStorageInterface
- */
- public $storage;
- /**
- * DumperEvent constructor.
- *
- * @param \Drupal\Core\Entity\EntityStorageInterface $storage
- * @param string $bundleName
- * @param array $entities
- */
- public function __construct(EntityStorageInterface $storage, string $bundleName, array $entities) {
- $this->storage = $storage;
- $this->bundleName = $bundleName;
- $this->entities = $entities;
- }
- }
|