本文整理匯總了PHP中repository::display_instances_list方法的典型用法代碼示例。如果您正苦於以下問題:PHP repository::display_instances_list方法的具體用法?PHP repository::display_instances_list怎麽用?PHP repository::display_instances_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類repository
的用法示例。
在下文中一共展示了repository::display_instances_list方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
$instanceoptionnames = repository::static_function($repository, 'get_instance_option_names');
if (empty($typeoptionnames) && empty($instanceoptionnames)) {
$displaysettingform = false;
}
}
if ($displaysettingform) {
$OUTPUT->box_start();
$mform->display();
$OUTPUT->box_end();
}
$return = false;
// Display instances list and creation form
if ($action == 'edit') {
$instanceoptionnames = repository::static_function($repository, 'get_instance_option_names');
if (!empty($instanceoptionnames)) {
repository::display_instances_list(get_context_instance(CONTEXT_SYSTEM), $repository);
}
}
}
}
} else {
if ($action == 'show') {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', '', $baseurl);
}
$repositorytype = repository::get_type_by_typename($repository);
if (empty($repositorytype)) {
print_error('invalidplugin', 'repository', '', $repository);
}
$repositorytype->update_visibility(true);
$return = true;
示例2: repository_exception
if (!empty($delete)) {
// admin_externalpage_print_header();
$instance = repository::get_instance($delete);
//if you try to delete an instance set as readonly, display an error message
if ($instance->readonly) {
throw new repository_exception('readonlyinstance', 'repository');
}
if ($sure) {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', '', $baseurl);
}
if ($instance->delete()) {
$deletedstr = get_string('instancedeleted', 'repository');
print_heading($deletedstr);
redirect($baseurl, $deletedstr, 3);
} else {
print_error('instancenotdeleted', 'repository', $baseurl);
}
exit;
}
notice_yesno(get_string('confirmdelete', 'repository', $instance->name), $baseurl . '&delete=' . $delete . '&sure=yes', $baseurl);
$return = false;
} else {
repository::display_instances_list($context);
$return = false;
}
}
if (!empty($return)) {
redirect($baseurl);
}
print_footer($course);
示例3:
$instanceoptionnames = repository::static_function($repository, 'get_instance_option_names');
if (empty($typeoptionnames) && empty($instanceoptionnames)) {
$displaysettingform = false;
}
}
if ($displaysettingform) {
$OUTPUT->box_start();
$mform->display();
$OUTPUT->box_end();
}
$return = false;
// Display instances list and creation form
if ($action == 'edit') {
$instanceoptionnames = repository::static_function($repository, 'get_instance_option_names');
if (!empty($instanceoptionnames)) {
repository::display_instances_list(context_system::instance(), $repository);
}
}
}
}
} else {
if ($action == 'show') {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', '', $baseurl);
}
$repositorytype = repository::get_type_by_typename($repository);
if (empty($repositorytype)) {
print_error('invalidplugin', 'repository', '', $repository);
}
$repositorytype->update_visibility(true);
$return = true;