You are here

function heartbeat_form_alter in Heartbeat 8

Implements hook_form_alter().

File

./heartbeat.module, line 505
Contains heartbeat.module.

Code

function heartbeat_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  $form['#attached']['drupalSettings']['admin'] = in_array('administrator', \Drupal::currentUser()
    ->getRoles());
}