示例#1
0
 /**
  * {@inheritdoc}
  */
 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);
     if ($persist) {
         $this->staticOverride->saveOverride($this->getPluginId(), $overrides);
     }
     // Update the definition.
     $this->pluginDefinition = $overrides + $this->getPluginDefinition();
     return $this->pluginDefinition;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 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);
     // Update the definition.
     $this->pluginDefinition = $overrides + $this->getPluginDefinition();
     if ($persist) {
         // Always save the menu name as an override to avoid defaulting to tools.
         $overrides['menu_name'] = $this->pluginDefinition['menu_name'];
         $this->staticOverride->saveOverride($this->getPluginId(), $overrides);
     }
     return $this->pluginDefinition;
 }