<?php
//#################################################################################################
// Menuitem class
//#################################################################################################
// chillyCMS - Content Management System
// Copyright (C) 2008
// Stefanie Wiegand <hide@address.com> & Johannes Cox <hide@address.com>
//
// This program is licensed under the GPL 3.0 license. For more information see LICENSE.txt.
//#################################################################################################
defined('DOIT') or die('Restricted access');
require_once("listitem.class.php");
class Menuitem extends Listitem {
//Class variables//////////////////////////////////////////////////////////////////////////
private $name;
private $treeid; //id of the menu containing this item, null if item is a menu
private $depth; //Depth in the tree. 0:root, 1:node, 2:leaf
private $parentid; //id of the parent
private $active; //viewable to public?
private $startpage; //Is it the startpage? 0:no, 1:yes
private $modid; //modid of the mainmodule
private $modname; //name of the moduletype
private $settings; //settings of the mainmodule
private $access; //standard access: 0:everybody, 1:users, 2:admins
private $specialaccess; //commaseparated list of special gids (>2)
private $uid; //user who made the menuitem
private $date_new; //date of creation
private $date_edit; //date of last edit
private $views;
private $content; //actual content of the page
private $haschildren;
//Functions////////////////////////////////////////////////////////////////////////////////
//Constructor
function __construct($id,$name,$treeid,$depth,$parentid,$order,$prev,$next,$active,$startpage,$modid,
$modname,$settings,$access,$specialaccess,$uid,$date_new,$date_edit,$views,$content,$haschildren) {
parent::__construct($id,$order,$prev,$next);
$this->name = $name;
$this->treeid = $treeid;
$this->depth = $depth;
$this->parentid = $parentid;
$this->active = $active;
$this->startpage = $startpage;
$this->modid = $modid;
$this->modname = $modname;
$this->settings = $settings;
$this->access = $access;
$this->specialaccess = $specialaccess;
$this->uid = $uid;
$this->date_new = $date_new;
$this->date_edit = $date_edit;
$this->views = $views;
$this->content = $content;
$this->haschildren = $haschildren;
}
//Destructor
function __destruct() {
parent::__destruct();
$this->name=$this->treeid=$this->depth=$this->parentid=$this->active=
$this->startpage=$this->modid=$this->modname=$this->access=$this->specialaccess=
$this->uid=$this->date_new=$this->date_edit=$this->views=$this->content=$this->haschildren=false;
}
//Getter
public function __get($name) {
if (isset($name, $this->$name)) { return $this->$name; }
else { return false; }
}
//Setter
public function __set($name,$value) {
if (isset($name, $this->$name)) { $this->$name=$value; }
else { return false; }
}
} ?>