function _contextual_id_to_links
_contextual_id_to_links($id)
Unserializes the result of _contextual_links_to_id().
Parameters
string $id: A serialized representation of a #contextual_links property value array.
Return value
array The value for a #contextual_links property.
See also
_contextual_links_to_id
File
- core/modules/contextual/contextual.module, line 202
- Adds contextual links to perform actions related to elements on a page.
Code
function _contextual_id_to_links($id) { $contextual_links = array(); $contexts = explode('|', $id); foreach ($contexts as $context) { list($group, $route_parameters_raw, $metadata_raw) = explode(':', $context); parse_str($route_parameters_raw, $route_parameters); $metadata = array(); parse_str($metadata_raw, $metadata); $contextual_links[$group] = array( 'route_parameters' => $route_parameters, 'metadata' => $metadata, ); } return $contextual_links; }
© 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!modules!contextual!contextual.module/function/_contextual_id_to_links/8.1.x