本文整理汇总了PHP中bootstrap::icon_spacer方法的典型用法代码示例。如果您正苦于以下问题:PHP bootstrap::icon_spacer方法的具体用法?PHP bootstrap::icon_spacer怎么用?PHP bootstrap::icon_spacer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bootstrap
的用法示例。
在下文中一共展示了bootstrap::icon_spacer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: spacer
public function spacer(array $attributes = null, $br = false)
{
return bootstrap::icon_spacer();
}
示例2: plugins_check_table
/**
* need to split these tables or something, mark the headers as thead?
*/
public function plugins_check_table(plugin_manager $pluginman, $version, array $options = array())
{
global $CFG;
$plugininfo = $pluginman->get_plugins();
if (empty($plugininfo)) {
return '';
}
$options['full'] = isset($options['full']) ? (bool) $options['full'] : false;
$options['xdep'] = isset($options['xdep']) ? (bool) $options['xdep'] : false;
$table = new html_table();
$table->id = 'plugins-check';
$table->attributes['class'] = 'table table-striped table-hover';
$table->head = array(get_string('displayname', 'core_plugin'), get_string('rootdir', 'core_plugin'), get_string('source', 'core_plugin'), get_string('versiondb', 'core_plugin'), get_string('versiondisk', 'core_plugin'), get_string('requires', 'core_plugin'), get_string('status', 'core_plugin'));
$table->data = array();
$numofhighlighted = array();
// number of highlighted rows per this subsection
foreach ($plugininfo as $type => $plugins) {
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
$header->header = true;
$header->colspan = count($table->head);
$header = new html_table_row(array($header));
$header->attributes['class'] = 'plugintypeheader type-' . $type;
$numofhighlighted[$type] = 0;
if (empty($plugins) and $options['full']) {
$msg = new html_table_cell(get_string('noneinstalled', 'core_plugin'));
$msg->colspan = count($table->head);
$row = new html_table_row(array($msg));
$row->attributes['class'] .= 'warning msg-noneinstalled';
$table->data[] = $header;
$table->data[] = $row;
continue;
}
$plugintyperows = array();
foreach ($plugins as $name => $plugin) {
$row = new html_table_row();
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name)) {
$icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'smallicon pluginicon'));
} else {
$icon = bootstrap::icon_spacer();
}
$displayname = $icon . ' ' . $plugin->displayname;
$displayname = new html_table_cell($displayname);
$rootdir = new html_table_cell($plugin->get_dir());
if ($isstandard = $plugin->is_standard()) {
$source = new html_table_cell(get_string('sourcestd', 'core_plugin'));
} else {
$source = new html_table_cell(label::warning(get_string('sourceext', 'core_plugin')));
}
$versiondb = new html_table_cell($plugin->versiondb);
$versiondisk = new html_table_cell($plugin->versiondisk);
$statuscode = $plugin->get_status();
$status = get_string('status_' . $statuscode, 'core_plugin');
if ($statuscode === 'upgrade') {
$status = label::info($status);
} else {
if ($statuscode === 'new') {
$status = label::success($status);
}
}
$availableupdates = $plugin->available_updates();
if (!empty($availableupdates) and empty($CFG->disableupdatenotifications)) {
foreach ($availableupdates as $availableupdate) {
$status .= $this->plugin_available_update_info($availableupdate);
}
}
$status = new html_table_cell($status);
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version));
$statusisboring = in_array($statuscode, array(plugin_manager::PLUGIN_STATUS_NODB, plugin_manager::PLUGIN_STATUS_UPTODATE));
$coredependency = $plugin->is_core_dependency_satisfied($version);
$otherpluginsdependencies = $pluginman->are_dependencies_satisfied($plugin->get_other_required_plugins());
$dependenciesok = $coredependency && $otherpluginsdependencies;
if ($options['xdep']) {
// we want to see only plugins with failed dependencies
if ($dependenciesok) {
continue;
}
} else {
if ($isstandard and $statusisboring and $dependenciesok and empty($availableupdates)) {
// no change is going to happen to the plugin - display it only
// if the user wants to see the full list
if (empty($options['full'])) {
continue;
}
}
}
// ok, the plugin should be displayed
$numofhighlighted[$type]++;
$row->cells = array($displayname, $rootdir, $source, $versiondb, $versiondisk, $requires, $status);
$plugintyperows[] = $row;
}
if (empty($numofhighlighted[$type]) and empty($options['full'])) {
continue;
}
$table->data[] = $header;
$table->data = array_merge($table->data, $plugintyperows);
}
//.........这里部分代码省略.........