本文整理汇总了PHP中core_plugin_manager::plugin_name方法的典型用法代码示例。如果您正苦于以下问题:PHP core_plugin_manager::plugin_name方法的具体用法?PHP core_plugin_manager::plugin_name怎么用?PHP core_plugin_manager::plugin_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core_plugin_manager
的用法示例。
在下文中一共展示了core_plugin_manager::plugin_name方法的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;
}