You are here

public function SocialTaggingService::getAllChildren in Open Social 8.3

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  2. 8 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  3. 8.2 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  4. 8.4 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  5. 8.5 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  6. 8.6 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  7. 8.7 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  8. 8.8 modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  9. 10.3.x modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  10. 10.0.x modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  11. 10.1.x modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()
  12. 10.2.x modules/social_features/social_tagging/src/SocialTaggingService.php \Drupal\social_tagging\SocialTaggingService::getAllChildren()

Returns all the children of top level term items.

Return value

array An array of child items.

1 call to SocialTaggingService::getAllChildren()
SocialTaggingService::hasContent in modules/social_features/social_tagging/src/SocialTaggingService.php
Returns if there are any taxonomy items available.

File

modules/social_features/social_tagging/src/SocialTaggingService.php, line 126

Class

SocialTaggingService
Provides a custom tagging service.

Namespace

Drupal\social_tagging

Code

public function getAllChildren() {

  // Define as array.
  $options = [];

  // Fetch main categories.
  foreach (array_keys($this
    ->getCategories()) as $category) {
    $options = array_merge($options, $this
      ->getChildren($category));
  }

  // Return array.
  return $options;
}