diff --git a/zin/func.php b/zin/func.php index bc9b4f2456..8b513ba618 100644 --- a/zin/func.php +++ b/zin/func.php @@ -28,3 +28,4 @@ function actionItem() {return createWg('actionitem', func_get_args());} function nav() {return createWg('nav', func_get_args());} function label() {return createWg('label', func_get_args());} function dtable() {return createWg('dtable', func_get_args());} +function menu() {return createWg('menu', func_get_args());} diff --git a/zin/wg/menu/v1.php b/zin/wg/menu/v1.php new file mode 100644 index 0000000000..bedbf3132d --- /dev/null +++ b/zin/wg/menu/v1.php @@ -0,0 +1,34 @@ +prop('items'); + return h::menu + ( + setClass('menu'), + set($this->props->skip(array_keys(static::getDefinedProps()))), + is_array($items) ? array_map(array($this, 'onBuildItem'), $this->prop('items')) : NULL, + $this->children(), + ); + } +}