Skip to content
Snippets Groups Projects
Unverified Commit 3f4af33b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3035350 by claudiu.cristea: Remove usages of drupal_static() from field_test.module

parent 59f1d6cb
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ function field_test_entity_type_alter(array &$entity_types) { ...@@ -19,7 +19,7 @@ function field_test_entity_type_alter(array &$entity_types) {
* Helper function to enable entity translations. * Helper function to enable entity translations.
*/ */
function field_test_entity_info_translatable($entity_type_id = NULL, $translatable = NULL) { function field_test_entity_info_translatable($entity_type_id = NULL, $translatable = NULL) {
$stored_value = &drupal_static(__FUNCTION__, []); static $stored_value = [];
if (isset($entity_type_id)) { if (isset($entity_type_id)) {
$entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
$entity_type = $entity_definition_update_manager->getEntityType($entity_type_id); $entity_type = $entity_definition_update_manager->getEntityType($entity_type_id);
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
* for that key. * for that key.
*/ */
function field_test_memorize($key = NULL, $value = NULL) { function field_test_memorize($key = NULL, $value = NULL) {
$memorize = &drupal_static(__FUNCTION__, NULL); static $memorize;
if (!isset($key)) { if (!isset($key)) {
$return = $memorize; $return = $memorize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment