Results
06.09.2020
dfm 8.x-1.16 ::
src/DfmDrupal.php
$tags[$i] = "$type:$id";
}
\Drupal::cache('entity')->invalidateMultiple($cids);
Cache::invalidateTags($tags);
}
}
}
} 18.06.2020
field_encrypt 8.x-2.x-dev ::
tests/src/Functional/CacheTest.php
// Check that no initial cache entry is present.
$this->assertFalse(\Drupal::cache('entity')->get($cid), 'Entity cache: no initial cache.');
$controller = $this->entityTypeManager->getStorage($entity_type);
$controller->load($this->testNode->id());
// Check if entity gets cached.
$this->assertFalse(\Drupal::cache('entity')->get($cid), 'Entity cache: entity is not in persistent cache.');
// Set encrypted field as cacheable.
$this->config('field_encrypt.settings')
->set('make_entities_uncacheable', FALSE)
->save();
// Clear memory cache so the entity will now make it to the persistent
/** @var false|object $cache */
$cache = \Drupal::cache('entity')->get($cid);
$this->assertTrue(is_object($cache), 'Entity cache: entity is in persistent cache.');
}
/**
* {@inheritdoc}
*/ 16.10.2020
mutual_credit 5.0.x-dev ::
src/Plugin/Field/FieldWidget/Worth.php
$form[$field_name]['widget'][0]['value']['main']['#default_value'] = '';
$form[$field_name]['widget'][0]['value']['main']['#value'] = '';
\Drupal::cache('entity')->delete('values:mc_wallet:'.$wid);
return $form[$field_name];
}
} 25.11.2024
translation_owner 1.0.1 ::
src/Drush/Commands/TranslationOwnerCommands.php
\Drupal::service('cache_tags.invalidator')->invalidateTags(['node:' . $nid]);
\Drupal::service('entity.memory_cache')->deleteAll();
\Drupal::cache('entity')->delete('values:node:' . $nid);
$this->logger()->success(dt('Successfully updated translation owner for node @nid (@lang) from user @old_uid to @new_uid', [
'@nid' => $nid,
'@lang' => $langcode,
'@old_uid' => $current_uid,
'@new_uid' => $new_uid, 