From af672662cb3a720ceafe692b62d4534eea8fe081 Mon Sep 17 00:00:00 2001 From: Marc van Gend <marc@triquanta.nl> Date: Mon, 6 Oct 2014 17:36:36 +0200 Subject: [PATCH] start code cleanup --- src/Plugin/Derivative/FieldBlock.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Derivative/FieldBlock.php b/src/Plugin/Derivative/FieldBlock.php index 2636138..de4f25e 100644 --- a/src/Plugin/Derivative/FieldBlock.php +++ b/src/Plugin/Derivative/FieldBlock.php @@ -24,7 +24,7 @@ class FieldBlock extends DeriverBase { * {@inheritdoc} */ public function getDerivativeDefinitions($base_plugin_definition) { - $blocks = FieldBlockHelper::fieldBlockGetBlockList(); + $blocks = $this->fieldBlockGetBlockList(); foreach ($blocks as $fieldblock_id => $description) { $this->derivatives[$fieldblock_id] = $base_plugin_definition; @@ -39,7 +39,8 @@ class FieldBlock extends DeriverBase { * * @return array An array of fieldblocks. */ - public static function fieldBlockGetBlockList() { + protected function fieldBlockGetBlockList() { + // @todo Check if we actually need static caching. $fieldblocks = &drupal_static(__FUNCTION__); if (!isset($fieldblocks)) { -- GitLab