本文整理汇总了PHP中RevOperations::getPermission方法的典型用法代码示例。如果您正苦于以下问题:PHP RevOperations::getPermission方法的具体用法?PHP RevOperations::getPermission怎么用?PHP RevOperations::getPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevOperations
的用法示例。
在下文中一共展示了RevOperations::getPermission方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RevSlide
<?php
//get input
$slideID = UniteFunctionsRev::getGetVar("id");
$permission = RevOperations::getPermission(GlobalsRevSlider::PERMISSION_SLIDE_OPERATIONS);
$permission_edit = RevOperations::getPermission(GlobalsRevSlider::PERMISSION_EDIT_SLIDE);
$permission_setting = RevOperations::getPermission(GlobalsRevSlider::PERMISSION_SLIDER_SETTINGS);
//validate permission
if (!$permission_edit) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
//dmp($slideParams);exit();
$operations = new RevOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSlideNames = $slider->getArrSlideNames();
//check if slider is template
$sliderTemplate = $slider->getParam("template", "false");
//set slide delay
$sliderDelay = $slider->getParam("delay", "9000");
$slideDelay = $slide->getParam("delay", "");
if (empty($slideDelay)) {
$slideDelay = $sliderDelay;
}