You are here

function subuser_switch_subuser_ui_data_alter in Subuser 8

Same name and namespace in other branches
  1. 7.2 switch/subuser_switch.module \subuser_switch_subuser_ui_data_alter()

File

switch/subuser_switch.module, line 83
Provides primary Drupal hook implementations.

Code

function subuser_switch_subuser_ui_data_alter(&$data) {
  $data['header']['switch'] = array(
    'data' => t('Switch'),
    'class' => 'switch',
  );
  foreach ($data['rows'] as $key => &$row) {
    $row['switch'] = array(
      'data' => l('Switch', sprintf('user/%s/switch', $key)),
      'class' => 'switch',
    );
  }
}