<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_Api_Eventhighlight extends vB_Api { protected $library = null; public function __construct() { $this->library = vB_Library::instance('eventhighlight'); } public function getEventHighlightAdmin($eventhighlightid, $withPermissions = false) { $this->checkEventHighlightAdminPermissions(); return $this->library->getEventHighlightAdmin($eventhighlightid, $withPermissions); } public function getEventHighlightsAdmin($eventhighlightids = array(), $withPermissions = false) { $this->checkEventHighlightAdminPermissions(); return $this->library->getEventHighlightsAdmin($eventhighlightids, $withPermissions); } public function getEventHighlightsUser() { return $this->library->getEventHighlightsUser(); } public function getEventHighlightViewInfo() { return $this->library->getEventHighlightViewInfo(); } public function saveEventHighlight($data) { $this->checkEventHighlightAdminPermissions(); return $this->library->saveEventHighlight($data); } public function deleteEventHighlight($eventhighlightid) { $this->checkEventHighlightAdminPermissions(); return $this->library->deleteEventHighlight($eventhighlightid); } public function saveEventHighlightDisplayOrder($displayOrder) { $this->checkEventHighlightAdminPermissions(); return $this->library->saveEventHighlightDisplayOrder($displayOrder); } public function saveEventHighlightPermissions($eventhighlightid, $denybydefault, $denyusergroups) { $this->checkEventHighlightAdminPermissions(); return $this->library->saveEventHighlightPermissions($eventhighlightid, $denybydefault, $denyusergroups); } private function checkEventHighlightAdminPermissions() { $this->checkHasAdminPermission('canadminforums'); } } 