Skip to content

Instantly share code, notes, and snippets.

@lussoluca
Created October 5, 2015 06:31
Show Gist options
  • Save lussoluca/3aad9da26b7485f23384 to your computer and use it in GitHub Desktop.
Save lussoluca/3aad9da26b7485f23384 to your computer and use it in GitHub Desktop.
/** @var \Drupal\webprofiler\Profiler\Profiler $profiler */
$profiler = $this->getContainer()->get('profiler');
$tokens = $profiler->find(NULL, NULL, 1000, NULL, '', '');
$forms = [];
foreach ($tokens as $token) {
$profile = $profiler->loadProfile($token);
/** @var \Drupal\webprofiler\DataCollector\FormsDataCollector $form */
$form = $profile->getCollector('forms');
$forms[] = $form->getForms();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment