function opigno_messaging_update_8010 in Opigno messaging 8
Update private messages views header link with icons.
File
- ./
opigno_messaging.install, line 135 - Install, update and uninstall functions for the Opigno Messaging module.
Code
function opigno_messaging_update_8010() {
$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"><i class="icon-plus"></i>New message</a><h2 class="messages">Messages</h2>';
$config_storage
->write('views.view.private_message', $data);
}