當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Installer::removeRoles方法代碼示例

本文整理匯總了PHP中Installer::removeRoles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Installer::removeRoles方法的具體用法?PHP Installer::removeRoles怎麽用?PHP Installer::removeRoles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Installer的用法示例。


在下文中一共展示了Installer::removeRoles方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: use_helper

<?php
/*
 * Banner Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
 *
 * This file is part of Banner Plugin. Banner Plugin is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */

// Security Measure
if (!defined('IN_CMS')) { exit(); }

use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'banner') ) Installer::failUninstall( 'banner' );

if ( ! Installer::removePermissions('banner_view,banner_new,banner_edit,banner_delete,banner_settings') ) Installer::failUninstall( 'banner' );

if ( ! Installer::removeRoles('banner admin,banner manager') ) Installer::failUninstall( 'banner' );

if ( ! Plugin::deleteAllSettings('banner') ) Installer::failUninstall( 'banner', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));
開發者ID:realslacker,項目名稱:Banner-Plugin,代碼行數:24,代碼來源:uninstall.php

示例2: use_helper

 * Redirector Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (c) 2011 Shannon Brooks <shannon@brooksworks.com>
 * Adapted from Redirector by Design Spike <http://designspike.ca>
 * Major contributions and original idea by Cody at Design Spike
 *
 * Licensed under the MIT license
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Project home
 * http://www.github.com/realslacker/Redirector-Plugin
 */

//	security measure
if (!defined('IN_CMS')) { exit(); }

//	include the Installer helper
use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'redirector_redirects') ) Installer::failUninstall( 'redirector', __('Could not remove table 1 of 2.') );
if ( ! Installer::removeTable(TABLE_PREFIX.'redirector_404s') ) Installer::failUninstall( 'redirector', __('Could not remove table 2 of 2.') );

if ( ! Installer::removePermissions('redirector_view,redirector_new,redirector_edit,redirector_delete,redirector_settings') ) Installer::failUninstall( 'redirector' );

if ( ! Installer::removeRoles('redirector admin,redirector editor,redirector user') ) Installer::failUninstall( 'redirector' );

if ( ! Plugin::deleteAllSettings('redirector') ) Installer::failUninstall( 'redirector', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));

// EOF
開發者ID:realslacker,項目名稱:Redirector-Plugin,代碼行數:31,代碼來源:uninstall.php

示例3: use_helper

<?php
/*
 * Downloads Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
 *
 * This file is part of Downloads Plugin. Downloads Plugin is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */

// Security Measure
if (!defined('IN_CMS')) { exit(); }

//	include the Installer helper
use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'downloads') ) Installer::failUninstall( 'downloads' );
if ( ! Installer::removeTable(TABLE_PREFIX.'downloadtags') ) Installer::failUninstall( 'downloads' );
if ( ! Installer::removeTable(TABLE_PREFIX.'downloads_tags') ) Installer::failUninstall( 'downloads' );

if ( ! Installer::removePermissions('downloads_view,downloads_new,downloads_edit,downloads_delete,downloads_settings') ) Installer::failUninstall( 'downloads' );

if ( ! Installer::removeRoles('download manager admin,download manager editor') ) Installer::failUninstall( 'downloads' );

if ( ! Plugin::deleteAllSettings('downloads') ) Installer::failUninstall( 'downloads', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));
開發者ID:realslacker,項目名稱:Downloads-Plugin,代碼行數:27,代碼來源:uninstall.php

示例4: use_helper

<?php
/*
 * Facts Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
 */

//	security measure
if (!defined('IN_CMS')) { exit(); }

//	include the Installer helper
use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'facts') ) Installer::failUninstall( 'facts', __('Could not remove table 1 of 1.') );

if ( ! Installer::removePermissions('facts_view,facts_new,facts_edit,facts_delete') ) Installer::failUninstall( 'facts' );

if ( ! Installer::removeRoles('facts admin,facts editor,facts user') ) Installer::failUninstall( 'facts' );

if ( ! Plugin::deleteAllSettings('facts') ) Installer::failUninstall( 'facts', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));
開發者ID:realslacker,項目名稱:Facts-Plugin,代碼行數:22,代碼來源:uninstall.php


注:本文中的Installer::removeRoles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。