src/UI/MenuSet.php
public function export($pretty=false)
    {
        $tmp = new \stdClass();
        if ( $this->home != false ) $tmp->home = $this->home;
        if ( $this->left != false ) $tmp->left = $this->left->menu;
        if ( $this->right != false ) $tmp->right = $this->right->menu;
        if ( $pretty ) {
            return json_encode($tmp, JSON_PRETTY_PRINT);
        } else {
            return json_encode($tmp);
        }
    }
public function export($pretty=false)
    {
        $tmp = new \stdClass();
        if ( $this->home != false ) $tmp->home = $this->home;
        if ( $this->left != false ) $tmp->left = $this->left->menu;
        if ( $this->right != false ) $tmp->right = $this->right->menu;
        if ( $pretty ) {
            return json_encode($tmp, JSON_PRETTY_PRINT);
        } else {
            return json_encode($tmp);
        }
    }
public function export ( $ pretty = false ) { $ tmp = new \ stdClass ( ) ; if ( $ this -> home != false ) $ tmp -> home = $ this -> home ; if ( $ this -> left != false ) $ tmp -> left = $ this -> left -> menu ; if ( $ this -> right != false ) $ tmp -> right = $ this -> right -> menu ; if ( $ pretty ) { return json_encode ( $ tmp , JSON_PRETTY_PRINT ) ; } else { return json_encode ( $ tmp ) ; } }
Export a menu to JSON

@param $pretty - True if we want pretty output

@return string JSON string for the menu
Export a menu to JSON