deleteMultipleOverrides example


    if ($save) {
      $this->getConfig()->set('definitions', $all_overrides)->save();
    }
    return $save;
  }

  /** * {@inheritdoc} */
  public function deleteOverride($id) {
    return $this->deleteMultipleOverrides([$id]);
  }

  /** * {@inheritdoc} */
  public function loadMultipleOverrides(array $ids) {
    $result = [];
    if ($ids) {
      $all_overrides = $this->getConfig()->get('definitions') ?: [];
      foreach ($ids as $id) {
        $encoded_id = static::encodeId($id);
        
$config->expects($old_definitions != $new_definitions ? $this->once() : $this->never())
      ->method('save');

    $config_factory = $this->createMock('Drupal\Core\Config\ConfigFactoryInterface');
    $config_factory->expects($this->once())
      ->method('getEditable')
      ->willReturn($config);

    $static_override = new StaticMenuLinkOverrides($config_factory);

    if (is_array($ids)) {
      $static_override->deleteMultipleOverrides($ids);
    }
    else {
      $static_override->deleteOverride($ids);
    }
  }

  /** * Provides test data for testDeleteOverrides. */
  public function providerTestDeleteOverrides() {
    $data = [];
    
Home | Imprint | This part of the site doesn't use cookies.