protected MenuTreeStorage::prepareLink(array $link, $intersect = FALSE)
Prepares a link by unserializing values and saving the definition.
Parameters
array $link: The data loaded in the query.
bool $intersect: If TRUE, filter out values that are not part of the actual definition.
Return value
array The prepared link data.
File
- core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 627
Class
- MenuTreeStorage
- Provides a menu tree storage using the database.
Namespace
Drupal\Core\Menu
Code
protected function prepareLink(array $link, $intersect = FALSE) { foreach ($this->serializedFields() as $name) { if (isset($link[$name])) { $link[$name] = unserialize($link[$name]); } } if ($intersect) { $link = array_intersect_key($link, array_flip($this->definitionFields())); } $this->definitions[$link['id']] = $link; return $link; }
Please login to continue.