You are here

function hook_freelinking_prepopulate_query_alter in Freelinking 4.0.x

Same name and namespace in other branches
  1. 8.3 modules/freelinking_prepopulate/freelinking_prepopulate.api.php \hook_freelinking_prepopulate_query_alter()

Allows to alter the query parameters for prepopulate links.

Parameters

array &$query: The query array for the prepopulate link.

array $target: The target array in the plugin.

1 invocation of hook_freelinking_prepopulate_query_alter()
FreelinkingPrepopulate::buildLink in modules/freelinking_prepopulate/src/Plugin/freelinking/FreelinkingPrepopulate.php
Build a link with the plugin.

File

modules/freelinking_prepopulate/freelinking_prepopulate.api.php, line 25
Freelinking Prepopulate API.

Code

function hook_freelinking_prepopulate_query_alter(array &$query, array $target) {

  // Add some default fields.
  $query['edit[field_default]'] = 'some value';
}