public static Cache::mergeContexts(array $a = [], array $b = [])
Merges arrays of cache contexts and removes duplicates.
array $a: Cache contexts array to merge.
array $b: Cache contexts array to merge.
string[] The merged array of cache contexts.
public static function mergeContexts(array $a = [], array $b = []) { $cache_contexts = array_unique(array_merge($a, $b)); assert('\Drupal::service(\'cache_contexts_manager\')->assertValidTokens($cache_contexts)'); sort($cache_contexts); return $cache_contexts; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!Cache.php/function/Cache::mergeContexts/8.1.x