1 <?php
2 /**
3 * A simple CMS menu item
4 *
5 * @package cms
6 * @subpackage content
7 */
8 class CMSMenuItem extends SS_Object
9 {
10 /**
11 * The (translated) menu title
12 * @var string $title
13 */
14 public $title;
15
16 /**
17 * Relative URL
18 * @var string $url
19 */
20 public $url;
21
22 /**
23 * Parent controller class name
24 * @var string $controller
25 */
26 public $controller;
27
28 /**
29 * Menu priority (sort order)
30 * @var integer $priority
31 */
32 public $priority;
33
34 /**
35 * Create a new CMS Menu Item
36 * @param string $title
37 * @param string $url
38 * @param string $controller Controller class name
39 * @param integer $priority The sort priority of the item
40 */
41 public function __construct($title, $url, $controller = null, $priority = -1) {
42 $this->title = $title;
43 $this->url = $url;
44 $this->controller = $controller;
45 $this->priority = $priority;
46 parent::__construct();
47 }
48
49 }
50 ?>