コード例 #1
0
ファイル: menu.php プロジェクト: poef/ariadne
 public static function crumbs($options = array())
 {
     $current = $options['current'];
     if (!$current) {
         $current = ar::context()->getPath();
     }
     $top = $options['top'];
     if (!$top) {
         $top = ar_store::currentSite($current);
     }
     $options += array('current' => $current, 'top' => $top, 'filter' => '');
     $current = $options['current'];
     if (!$current) {
         $current = $top;
     }
     if ($options['filter']) {
         $query .= ' and ( ' . $options['filter'] . ' )';
     }
     return ar::get($current)->parents()->top($top);
 }