本文整理匯總了PHP中core_plugin_manager::plugin_external_source方法的典型用法代碼示例。如果您正苦於以下問題:PHP core_plugin_manager::plugin_external_source方法的具體用法?PHP core_plugin_manager::plugin_external_source怎麽用?PHP core_plugin_manager::plugin_external_source使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類core_plugin_manager
的用法示例。
在下文中一共展示了core_plugin_manager::plugin_external_source方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: plugin_uninstall_results_removable_page
/**
* Display a page with results of plugin uninstallation and offer removal of plugin files.
*
* @param core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param progress_trace_buffer $progress
* @param moodle_url $continueurl URL to continue to remove the plugin folder
* @return string
*/
public function plugin_uninstall_results_removable_page(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo, progress_trace_buffer $progress, moodle_url $continueurl)
{
$output = '';
$pluginname = $pluginman->plugin_name($pluginfo->component);
// Do not show navigation here, they must click one of the buttons.
$this->page->set_pagelayout('maintenance');
$this->page->set_cacheable(false);
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
$output .= $this->output->box($progress->get_buffer(), 'generalbox uninstallresultmessage');
$confirm = $this->output->container(get_string('uninstalldeleteconfirm', 'core_plugin', array('name' => $pluginname, 'rootdir' => $pluginfo->rootdir)), 'uninstalldeleteconfirm');
if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
$confirm .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype), 'uninstalldeleteconfirmexternal');
}
// After any uninstall we must execute full upgrade to finish the cleanup!
$output .= $this->output->confirm($confirm, $continueurl, new moodle_url('/admin/index.php'));
$output .= $this->output->footer();
return $output;
}