if (!
isset($link[$name])) { $link[$name] =
$default;
} } $fields =
array_intersect_key($link,
$schema_fields);
// Sort the route parameters so that the query string will be the same.
asort($fields['route_parameters'
]);
// Since this will be urlencoded, it's safe to store and match against a
// text field.
$fields['route_param_key'
] =
$fields['route_parameters'
] ? UrlHelper::
buildQuery($fields['route_parameters'
]) : '';
foreach ($this->
serializedFields() as $name) { if (isset($fields[$name])) { $fields[$name] =
serialize($fields[$name]);
} } $this->
setParents($fields,
$parent,
$original);
// Need to check both parent and menu_name, since parent can be empty in any
// menu.
if ($original && ($link['parent'
] !=
$original['parent'
] ||
$link['menu_name'
] !=
$original['menu_name'
])) { $this->
moveChildren($fields,
$original);
}