function _contextual_id_to_links
Same name and namespace in other branches
- 11.x core/modules/contextual/contextual.module \_contextual_id_to_links()
- 10 core/modules/contextual/contextual.module \_contextual_id_to_links()
- 9 core/modules/contextual/contextual.module \_contextual_id_to_links()
- 8.9.x core/modules/contextual/contextual.module \_contextual_id_to_links()
Unserializes the result of ContextualLinksSerializer::linksToId().
Note that $id is user input. Before calling this method the ID should be checked against the token stored in the 'data-contextual-token' attribute which is passed via the 'tokens' request parameter to \Drupal\contextual\ContextualController::render().
Parameters
string $id: A serialized representation of a #contextual_links property value array.
Return value
array The value for a #contextual_links property.
Deprecated
in drupal:11.4.0 and is removed from drupal:12.0.0. Use \Drupal\contextual\ContextualLinksSerializer::idToLinks() instead.
See also
https://www.drupal.org/node/3568088
\Drupal\contextual\ContextualLinksSerializer::linksToId()
\Drupal\contextual\ContextualController::render()
File
-
core/
modules/ contextual/ contextual.module, line 60
Code
function _contextual_id_to_links($id) : array {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Use \\Drupal\\contextual\\ContextualLinksSerializer::idToLinks() instead. See https://www.drupal.org/node/3568088', E_USER_DEPRECATED);
return \Drupal::service(ContextualLinksSerializer::class)->idToLinks($id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.