protected function Event::prepareEventManagers in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8.2 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8.3 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8.5 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8.6 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8.7 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 8.8 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 10.3.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 10.0.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 10.1.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
- 10.2.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventManagers()
Returns event managers.
Parameters
array $managers: An array of uuids.
Return value
array|null Returns an array or null.
1 call to Event::prepareEventManagers()
- Event::getEntry in modules/
custom/ social_demo/ src/ Plugin/ DemoContent/ Event.php - Makes an array with data of an entity.
File
- modules/
custom/ social_demo/ src/ Plugin/ DemoContent/ Event.php, line 190
Class
- Event
- Event Plugin for demo content.
Namespace
Drupal\social_demo\Plugin\DemoContentCode
protected function prepareEventManagers(array $managers) {
$values = NULL;
foreach ($managers as $uuid) {
// Load the user(s) by the given uuid(s).
$load = $this->userStorage
->loadByProperties([
'uuid' => $uuid,
]);
$account = current($load);
if ($account instanceof User) {
$properties = [
'target_id' => $account
->id(),
];
$values[] = $properties;
}
}
return $values;
}