Exemple #1
0
function Dwoo_Plugin_cat_fullmenu(Dwoo $dwoo)
{
    $attr = func_get_args();
    array_shift($attr);
    // first attr is $Dwoo
    return CAT_Helper_Menu::fullMenu($attr);
}
Exemple #2
0
function Dwoo_Plugin_cat_sitemap()
{
    $attr = func_get_args();
    // first attr is $Dwoo
    array_shift($attr);
    // second attr is $page_id
    $page_id = array_shift($attr);
    // third attr is the max depth
    $max_level = array_shift($attr);
    // fourth is a boolean
    $show_parent = array_shift($attr);
    return CAT_Helper_Menu::Sitemap($page_id, $max_level, $show_parent, $attr);
}
function Dwoo_Plugin_cat_breadcrumb()
{
    $attr = func_get_args();
    // first attr is $Dwoo
    array_shift($attr);
    // second attr is $page_id
    $page_id = array_shift($attr);
    // third attr is the max depth
    if (count($attr)) {
        $max_level = array_shift($attr);
    } else {
        $max_level = 999;
    }
    return CAT_Helper_Menu::breadcrumbMenu($page_id, $max_level, $attr);
}
Exemple #4
0
 /**
  * analyzes the given options and configures the ListBuilder
  *
  * @access private
  * @param  array   $options
  * @return object
  **/
 private static function analyzeOptions(array &$options = array())
 {
     $fixed = array();
     // reset temp array
     $lbopt = array();
     // reset list builder options
     self::$menu_no = NULL;
     // reset current menu number
     while ($opt = array_shift($options)) {
         if (preg_match('~^(.+?)\\:$~', $opt, $m)) {
             $value = array_shift($options);
             $fixed[$m[1]] = $value;
             continue;
         }
         list($key, $value) = explode(':', $opt);
         $fixed[$key] = $value;
     }
     foreach ($fixed as $key => $value) {
         if ($key == 'menu') {
             self::$menu_no = $value;
             continue;
         }
         if (isset(self::$_lbmap[$key])) {
             $lbopt[self::$_lbmap[$key]] = $value;
         }
     }
     // pass options to Listbuilder
     self::init_list()->set($lbopt);
     return isset($lbopt['ul_id']) ? $lbopt['ul_id'] : NULL;
 }