本文整理汇总了PHP中ViewList::removeView方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewList::removeView方法的具体用法?PHP ViewList::removeView怎么用?PHP ViewList::removeView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewList
的用法示例。
在下文中一共展示了ViewList::removeView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewFileName
if (isset($_GET['delete_view'])) {
if (!checkAccess(GangliaAcl::ALL_VIEWS, GangliaAcl::EDIT, $conf)) {
$output = "You do not have access to edit views.";
} else {
if (!$viewList->viewExists($view_name)) {
$output = "<strong>Alert:</strong> View with the name " . $view_name . " does not exist.";
} else {
$view_filename = viewFileName($view_name);
if (pathinfo($view_filename, PATHINFO_DIRNAME) != $conf['views_dir']) {
die('Invalid path detected');
}
if (unlink($view_filename) === FALSE) {
$output = "<strong>Alert:</strong>" . " Can't remove file {$view_filename}." . " Perhaps permissions are wrong.";
} else {
$output = "View has been successfully removed.";
$viewList->removeView($view_name);
}
}
}
}
// delete_view
///////////////////////////////////////////////////////////////////////////////
// Add to view
///////////////////////////////////////////////////////////////////////////////
if (isset($_GET['add_to_view'])) {
if (!checkAccess(GangliaAcl::ALL_VIEWS, GangliaAcl::EDIT, $conf)) {
$output = "You do not have access to edit views.";
} else {
if (!$viewList->viewExists($view_name)) {
$output = "<strong>Alert:</strong> View " . $view_name . " does not exist. This should not happen.";
} else {