本文整理汇总了PHP中plugin::uninstall方法的典型用法代码示例。如果您正苦于以下问题:PHP plugin::uninstall方法的具体用法?PHP plugin::uninstall怎么用?PHP plugin::uninstall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plugin
的用法示例。
在下文中一共展示了plugin::uninstall方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
/**
* Uninstall Mobile
*
* @param vivvo_site $site_manager
* @param integer $step
*/
function uninstall(&$site_manager, $step = 1)
{
parent::uninstall($site_manager, $step);
if ($step == 2) {
//Definition
$pl_manager =& $site_manager->get_plugin_manager();
$pl_manager->unregister('mobile');
//Url
$um =& $site_manager->get_url_manager();
$um->unregister_url('mobile');
}
$output = $site_manager->get_output();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo $output;
}
示例2: uninstall
/**
* Feed Importer uninstall procedure
*
* @param vivvo_site $site_manager
* @param int $step
*/
public function uninstall($site_manager, $step = 1)
{
parent::uninstall($site_manager, $step);
if ($step == 2) {
$sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
try {
$sqlRunner->load() and $sqlRunner->run();
} catch (SQLRunnerException $e) {
$this->set_error_code(14, $e->getMessage());
// error executing sql script file
$this->uninstall($site_manager, 1);
return;
}
$conf = $site_manager->get_configuration();
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTHOR');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTO_ARCHIVE');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTO_DELETE');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_PERIOD');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_STATUS');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_SHOW_COMMENT');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_UPDATE_ARTICLES');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_USE_LOGO');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_TRASH');
$conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_USER_ID');
$site_manager->unregister_action('feed');
require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php';
$cm = new vivvo_cron_manager($site_manager);
$cm->delete_cron_job($plugin_dir . 'tasks/auto_import_feeds.php', null, 'auto_import_feeds');
$site_manager->get_plugin_manager()->unregister($this->plugin_name);
}
$output = $site_manager->get_output();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo $output;
}
示例3: uninstall
/**
* Newsletter uninstall procedure
*
* @param vivvo_site $site_manager
* @param int $step
*/
public function uninstall($site_manager, $step = 1)
{
parent::uninstall($site_manager, $step);
if ($step == 2) {
$sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
try {
$sqlRunner->load() and $sqlRunner->run();
} catch (SQLRunnerException $e) {
$this->set_error_code(14, $e->getMessage());
// error executing sql script file
$this->uninstall($site_manager, 1);
return;
}
$conf = $site_manager->get_configuration();
$conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_SUBSCRIBE_BODY');
$conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_SUBSCRIBE_SUBJECT');
$conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_UNSUBSCRIBE_TEXT');
$conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_PERIOD');
$conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_NUMBER_OF_MAILS');
$site_manager->unregister_action('newsletter');
$site_manager->unregister_module('box_newsletter');
$site_manager->unregister_module('box_maillist');
$site_manager->get_url_manager()->unregister_url('newsletter');
require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php';
$cm = new vivvo_cron_manager($site_manager);
$cm->delete_cron_job($plugin_dir . 'tasks/mail_queue.php', null, 'mail_queue');
$site_manager->get_plugin_manager()->unregister($this->plugin_name);
}
$output = $site_manager->get_output();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo $output;
}
示例4: uninstall
/**
* Poll uninstall procedure
*
* @param vivvo_site $site_manager
* @param int $step
*/
public function uninstall($site_manager, $step = 1)
{
parent::uninstall($site_manager, $step);
if ($step == 2) {
$sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
try {
$sqlRunner->load() and $sqlRunner->run();
} catch (SQLRunnerException $e) {
$this->set_error_code(14, $e->getMessage());
// error executing sql script file
$this->uninstall($site_manager, 1);
return;
}
$site_manager->unregister_action('poll');
$site_manager->unregister_module('box_poll');
$site_manager->unregister_module('box_poll_list');
$site_manager->get_url_manager()->unregister_url('poll');
$site_manager->get_plugin_manager()->unregister($this->plugin_name);
}
$output = $site_manager->get_output();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo $output;
}
示例5: uninstall
/**
* Uninstall Pages
*
* @param vivvo_site $site_manager
* @param integer $step
*/
function uninstall(&$site_manager, $step = 1)
{
parent::uninstall($site_manager, $step);
if ($step == 2) {
//Uninstall procedure
//Table
$db =& $site_manager->get_db();
$dbm =& $site_manager->get_db_manager();
$db->manager->dropTable(VIVVO_DB_PREFIX . 'pages');
$site_manager->unregister_module('box_pages');
$site_manager->unregister_action('pages');
$pl_manager = $site_manager->get_plugin_manager();
$pl_manager->unregister('pages');
ui_hooks::unregister('plugin_pages_admin_content_subnav_hook');
}
$output = $site_manager->get_output();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo $output;
}
示例6: uninstall
/**
* Uninstall Image gallery
*
* @param vivvo_site $site_manager
* @param integer $step
*/
function uninstall(&$site_manager, $step = 1)
{
parent::uninstall($site_manager, $step);
if ($step == 2) {
//Table
$db =& $site_manager->get_db();
$dbm =& $site_manager->get_db_manager();
$db->manager->dropTable(VIVVO_DB_PREFIX . 'article_images');
//Definition
$pl_manager =& $site_manager->get_plugin_manager();
$pl_manager->unregister('image_gallery');
//Action
$site_manager->unregister_action('article_images');
//Configuration
$configuration =& $site_manager->get_configuration();
$configuration->remove_from_module('article_tabs', 'image_gallery');
//Boxes
$site_manager->unregister_module('box_article_images');
}
$output = $site_manager->get_output();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
echo $output;
}