Exemple #1
0
 /**
  * @param string $path
  * @param array &$item
  * @return string|bool
  */
 protected function _findParentPath($path, &$item)
 {
     if ($item) {
         if (!$item['access']) {
             // Parent should be the front page.
             return FALSE;
         }
         $parent_path = $this->pluginEngine->findParent($path, $item);
         if (isset($parent_path)) {
             return $parent_path;
         }
     }
     // fallback: chop off the last fragment of the system path.
     $parent_path = $this->router->reducePath($path);
     return isset($parent_path) ? $parent_path : FALSE;
 }