You are here

private function crumbs_Admin_DebugTable::getAllCandidates in Crumbs, the Breadcrumbs suite 7.2

Parameters

crumbs_PluginSystem_PluginEngine $unfilteredPluginEngine:

Return value

array

1 call to crumbs_Admin_DebugTable::getAllCandidates()
crumbs_Admin_DebugTable::addPluginResults in lib/Admin/DebugTable.php

File

lib/Admin/DebugTable.php, line 264

Class

crumbs_Admin_DebugTable

Code

private function getAllCandidates($unfilteredPluginEngine) {
  $candidates_all = array(
    'parent' => array(),
    'title' => array(),
  );
  $candidateKeys = array();
  $breadcrumb = array();
  foreach ($this->paths as $i => $path) {
    $candidates = $unfilteredPluginEngine
      ->findAllTitles($path, $this->trail[$path], $breadcrumb);
    $candidates_all['title'][$i] = $candidates;
    foreach ($candidates as $candidateKey => $candidate) {
      $candidateKeys[$candidateKey] = TRUE;
    }
    if ($i + 1 < count($this->trail)) {
      $candidates = $unfilteredPluginEngine
        ->findAllParents($path, $this->trail[$path]);
      $candidates_all['parent'][$i] = $candidates;
      foreach ($candidates as $candidateKey => $candidate) {
        $candidateKeys[$candidateKey] = TRUE;
      }
    }
  }
  return array(
    $candidates_all,
    $candidateKeys,
  );
}