You are here

protected function Event::prepareEventType in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  2. 8 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  3. 8.2 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  4. 8.3 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  5. 8.4 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  6. 8.5 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  7. 8.6 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  8. 8.7 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  9. 8.8 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  10. 10.3.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  11. 10.1.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()
  12. 10.2.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::prepareEventType()

Returns taxonomy term id.

Parameters

string $uuid: The uuid.

Return value

array|null Returns an array or null.

1 call to Event::prepareEventType()
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 164

Class

Event
Event Plugin for demo content.

Namespace

Drupal\social_demo\Plugin\DemoContent

Code

protected function prepareEventType($uuid) {
  $value = NULL;
  $terms = $this->termStorage
    ->loadByProperties([
    'uuid' => $uuid,
  ]);
  if ($terms) {
    $value = [
      [
        'target_id' => current($terms)
          ->id(),
      ],
    ];
  }
  return $value;
}