Skip to content

Instantly share code, notes, and snippets.

@vijaycs85
Created June 26, 2013 19:48
Show Gist options
  • Save vijaycs85/5870974 to your computer and use it in GitHub Desktop.
Save vijaycs85/5870974 to your computer and use it in GitHub Desktop.
<?php
// Got list of entity definition by below:
$entity_manager = Drupal::entityManager();
// While foreaching them, we want to know entities that are fieldable.
foreach ($entity_manager->getDefinitions() as $entity_info) {
if ($entity_info['fieldable'] && isset($entity_info['route_base_path'])) {
// now I can get the URL as admin/structure/contact/manage/{bundle}.
// is there anyway to get the available {bundle} here and foreach them?
// So that I can get admin/structure/contact/manage/feedback and admin/structure/contact/manage/sitewide etc?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment