You are here

function opigno_messaging_update_8007 in Opigno messaging 8

Update private messages views header link with base path.

File

./opigno_messaging.install, line 88
Install, update and uninstall functions for the Opigno Messaging module.

Code

function opigno_messaging_update_8007() {
  $config_path = drupal_get_path('module', 'opigno_messaging') . '/config/optional';
  $storage = new FileStorage($config_path);
  $config_storage = \Drupal::service('config.storage');
  $data = $storage
    ->read('views.view.private_message');
  $data['display']['default']['display_options']['header']['area_text_custom']['content'] = '<a class="new-message" href="[opigno:url-with-slash]private-message/create">New message</a><p class="messages">Messages</p>';
  $config_storage
    ->write('views.view.private_message', $data);
}