function opigno_lms_update_9006 in Opigno LMS 3.x
Remove the platon block and deprecated dashboard.
File
- ./
opigno_lms.install, line 213 - Install, update and uninstall functions for the "opigno_lms" installation profile.
Code
function opigno_lms_update_9006() {
try {
\Drupal::service('theme_installer')
->uninstall([
'platon',
]);
} catch (\Exception $e) {
}
_opigno_lms_apply_update('module', 'opigno_lms', 'config/optional', [
'block.block.dashboard_views_block_opigno_notifications_block_unread_dashboard',
'block.block.dashboard_views_block_private_message_block_dashboard',
'block.block.views_block__private_message_block_all',
'block.block.dashboard_views_block_who_s_online_who_s_online_block',
'block.block.dashboard_views_block_who_s_new_block_1',
'block.block.dashboard_views_block_opigno_score_modules_dashboard_notavaluated_modules',
'block.block.dashboard_views_block_opigno_group_members_block_pending',
'block.block.dashboard_views_block_opigno_calendar_month_block',
'block.block.views_block__opigno_calendar_month_block',
'block.block.dashboard_views_block_latest_active_trainings_block',
'block.block.dashboard_views_block_content_recent_block_1',
'block.block.dashboard_views_block_comments_recent_block_1',
'block.block.dashboard_calendar_legend_block',
'block.block.dashboard_search_form_block',
]);
_opigno_lms_apply_delete([
'platon.settings',
'block.block.platon_breadcrumbs',
'block.block.platon_content',
'block.block.platon_local_tasks',
'block.block.platon_messages',
'block.block.platon_page_title',
'block.block.platon_main_menu',
'block.block.addclassaction',
'block.block.platon_footer',
'block.block.platon_branding',
'block.block.platon_local_actions',
'block.block.privatemessageactions',
'block.block.privatemessageinbox',
'block.block.privatemessagenotification',
'block.block.learningpathprogress',
]);
$theme_data = \Drupal::config('core.extension')
->get('theme');
unset($theme_data['platon']);
\Drupal::configFactory()
->getEditable('core.extension')
->set('theme', $theme_data)
->save();
drupal_flush_all_caches();
}