You are here

function tmgmt_update_8002 in Translation Management Tool 8

Update the menu parent, to move job to the new translator menu block.

File

./tmgmt.install, line 35
Update function for the tmgmt module.

Code

function tmgmt_update_8002() {

  // Update views.
  $config_factory = \Drupal::configFactory();
  $view = $config_factory
    ->getEditable('views.view.tmgmt_job_overview');
  $displays = $view
    ->get('display');
  $displays['page_1']['display_options']['menu']['parent'] = 'tmgmt.admin_tmgmt';
  $displays['page_1']['display_options']['menu']['title'] = 'Jobs';
  $displays['page_1']['display_options']['menu']['description'] = 'Overview of Jobs.';
  $view
    ->set('display', $displays);
  $view
    ->save(TRUE);
}