class EntityPagerAnalyzeEvent in Entity Pager 8
Same name and namespace in other branches
- 2.0.x src/Event/EntityPagerAnalyzeEvent.php \Drupal\entity_pager\Event\EntityPagerAnalyzeEvent
Analyze event object.
Hierarchy
- class \Drupal\entity_pager\Event\EntityPagerAnalyzeEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of EntityPagerAnalyzeEvent
6 files declare their use of EntityPagerAnalyzeEvent
- EntityAnalyzerSubscriber.php in src/
EventSubscriber/ EntityAnalyzerSubscriber.php - EntityAnalyzerSubscriberTest.php in tests/
src/ Unit/ EntityAnalyzerSubscriberTest.php - EntityPagerAnalyzeEventTest.php in tests/
src/ Unit/ EntityPagerAnalyzeEventTest.php - EntityPagerAnalyzer.php in src/
EntityPagerAnalyzer.php - EntityPagerAnalyzerTest.php in tests/
src/ Unit/ EntityPagerAnalyzerTest.php
File
- src/
Event/ EntityPagerAnalyzeEvent.php, line 11
Namespace
Drupal\entity_pager\EventView source
class EntityPagerAnalyzeEvent extends Event {
/**
* The entity pager being analyzed.
*
* @var \Drupal\entity_pager\EntityPagerInterface
*/
protected $entityPager;
/**
* The log messages supplied.
*
* @var array
*/
protected $logs = [];
/**
* Constructs a new EntityPagerAnalyzeEvent.
*
* @param \Drupal\entity_pager\EntityPagerInterface $entityPager
* The entity pager.
*/
public function __construct(EntityPagerInterface $entityPager) {
$this->entityPager = $entityPager;
}
/**
* Gets the entity pager.
*
* @return \Drupal\entity_pager\EntityPagerInterface
* The entity pager.
*/
public function getEntityPager() {
return $this->entityPager;
}
/**
* Sets the entity pager.
*
* @param \Drupal\entity_pager\EntityPagerInterface $entityPager
* The entity pager.
*/
public function setEntityPager(EntityPagerInterface $entityPager) {
$this->entityPager = $entityPager;
}
/**
* Gets the logs array.
*
* @return array
* The logs array.
*/
public function getLogs() {
return $this->logs;
}
/**
* Sets the logs array.
*
* @param array $logs
* The logs array.
*/
public function setLogs(array $logs) {
$this->logs = $logs;
}
/**
* Logs one or more messages.
*
* @param array|string $messages
* One or more messages to log.
*/
public function log($messages) {
foreach ((array) $messages as $message) {
$this->logs[] = $message;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityPagerAnalyzeEvent:: |
protected | property | The entity pager being analyzed. | |
EntityPagerAnalyzeEvent:: |
protected | property | The log messages supplied. | |
EntityPagerAnalyzeEvent:: |
public | function | Gets the entity pager. | |
EntityPagerAnalyzeEvent:: |
public | function | Gets the logs array. | |
EntityPagerAnalyzeEvent:: |
public | function | Logs one or more messages. | |
EntityPagerAnalyzeEvent:: |
public | function | Sets the entity pager. | |
EntityPagerAnalyzeEvent:: |
public | function | Sets the logs array. | |
EntityPagerAnalyzeEvent:: |
public | function | Constructs a new EntityPagerAnalyzeEvent. |