public function getEntityBundles(array $module_configs) {
    $list = [];
    foreach ($this->entityBundlesConfigPrefixes as $entity_type => $data) {
      $filtered_array = preg_grep('/^' . $data['prefix'] . '.*/', $module_configs);
      if (empty($filtered_array)) {
        continue;
      }

      foreach ($filtered_array as $config_name) {
        // Example - paragraphs.paragraphs_type.blog_posts_listing.
        // Example - taxonomy.vocabulary.amenities.
        // Example - node.type.landing_page.
        // Last array item always entity bundle name.
        $entity_info = explode('.', $config_name);
        $list[] = [
          'entity_type' => $entity_type,
          'config_entity_type' => $data['config_entity_type'],
          'bundle' => end($entity_info),
          'bundle_field' => $data['bundle_field'],
        ];
      }
    }

    return $list;
  }
public function getEntityBundles(array $module_configs) {
    $list = [];
    foreach ($this->entityBundlesConfigPrefixes as $entity_type => $data) {
      $filtered_array = preg_grep('/^' . $data['prefix'] . '.*/', $module_configs);
      if (empty($filtered_array)) {
        continue;
      }

      foreach ($filtered_array as $config_name) {
        // Example - paragraphs.paragraphs_type.blog_posts_listing.
        // Example - taxonomy.vocabulary.amenities.
        // Example - node.type.landing_page.
        // Last array item always entity bundle name.
        $entity_info = explode('.', $config_name);
        $list[] = [
          'entity_type' => $entity_type,
          'config_entity_type' => $data['config_entity_type'],
          'bundle' => end($entity_info),
          'bundle_field' => $data['bundle_field'],
        ];
      }
    }

    return $list;
  }
public function getEntityBundles ( array $ module_configs ) { $ list = [ ] ; foreach ( $ this -> entityBundlesConfigPrefixes as $ entity_type => $ data ) { $ filtered_array = preg_grep ( '/^' . $ data [ 'prefix' ] . '.*/' , $ module_configs ) ; if ( empty ( $ filtered_array ) ) { continue ; } foreach ( $ filtered_array as $ config_name ) { // Example - paragraphs.paragraphs_type.blog_posts_listing. // Example - taxonomy.vocabulary.amenities. // Example - node.type.landing_page. // Last array item always entity bundle name. $ entity_info = explode ( '.' , $ config_name ) ; $ list [ ] = [ 'entity_type' => $ entity_type , 'config_entity_type' => $ data [ 'config_entity_type' ] , 'bundle' => end ( $ entity_info ) , 'bundle_field' => $ data [ 'bundle_field' ] , ] ; } } return $ list ; }
Find entity bundles in module configs list.

@param array $module_configs
Module configs.

@return array
Entities list with entity info.
Find entity bundles in module configs list .