You are here

function lightning_core_local_tasks_alter in Lightning Core 8.3

Same name and namespace in other branches
  1. 8.5 lightning_core.module \lightning_core_local_tasks_alter()
  2. 8 lightning_core.module \lightning_core_local_tasks_alter()
  3. 8.2 lightning_core.module \lightning_core_local_tasks_alter()
  4. 8.4 lightning_core.module \lightning_core_local_tasks_alter()

Implements hook_local_tasks_alter().

File

./lightning_core.module, line 40
Contains core functionality for the Lightning distribution.

Code

function lightning_core_local_tasks_alter(array &$local_tasks) {

  // When Content Moderation is installed, the "Edit" tab may have different
  // text, depending on the circumstances. In order for Behat tests to visit
  // the edit form, there must be a consistent way to target the tab. Rather
  // than rely on the text, set a consistent 'rel' attribute which step
  // definitions can reliably target.
  $local_tasks['entity.node.edit_form']['options']['attributes']['rel'] = 'edit-form';
}