Пример #1
0
 /**
  * @desc Constructor
  * @param string $title Menu title
  * @param string $url Destination url
  * @param string $image Menu's image url relative to the website root or absolute
  * @param string $type Menu's type
  * @param int $id The Menu's id in the database
  */
 public function __construct($title, $url, $image = '', $type = self::AUTOMATIC_MENU)
 {
     // Set the menu type
     $this->type = in_array($type, self::get_menu_types_list()) ? $type : self::AUTOMATIC_MENU;
     $this->type = in_array($this->type, array(self::HORIZONTAL_SCROLLING_MENU, self::VERTICAL_SCROLLING_MENU)) ? self::STATIC_MENU : $this->type;
     // Build the menu element on witch is based the menu
     parent::__construct($title, $url, $image);
 }
Пример #2
0
 /**
  * @desc Constructor
  * @param string $title Menu title
  * @param string $url Destination url
  * @param string $image Menu's image url relative to the website root or absolute
  * @param int $id The Menu's id in the database
  */
 public function __construct($title, $url, $image = '')
 {
     parent::__construct($title, $url, $image);
 }