Problem/Motivation
In #2301239: MenuLinkNG part1 (no UI or conversions): plugins (static + MenuLinkContent) + MenuLinkManager + MenuTreeStorage noticed that it would make sense to throw an exception instead of silently ignoring values that were attempted to be updated.
Proposed resolution
Find all the places like
public function updateLink(array $new_definition_values, $persist) {
// Filter the list of updates to only those that are allowed.
$overrides = array_intersect_key($new_definition_values, $this->overrideAllowed);
Throw an exception if a value in $new_definition_values was for a key not allowed in overrideAllowed.
Remaining tasks
User interface changes
No.
API changes
Exception thrown.
Comments
Comment #1
xjm@YesCT pointed out that there's another case like this in StaticMenuLinkOverrides::saveOverride().
Comment #2
YesCT CreditAttribution: YesCT commentedI bet we silently ignore, because then we dont have to build a small array with just the values we want to change and can just update the array and pass it in.
Comment #3
xjmComment #4
mgifford