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);
} // We needed the mlid above, but not in the update query.
unset($fields['mlid'
]);
// Cast Booleans to int, if needed.
$fields['enabled'
] =
(int) $fields['enabled'
];
$fields['expanded'
] =
(int) $fields['expanded'
];
return $fields;
} /**
* {@inheritdoc}
*/