From f68b310b5ab0bcf652b5b98e37f76a0b773d7fd4 Mon Sep 17 00:00:00 2001
From: sutharsan <sutharsan@73854.no-reply.drupal.org>
Date: Sun, 29 Apr 2018 13:23:02 +0200
Subject: [PATCH] Issue #2966529 by Sutharsan: Various clean-ups

---
 src/BlockEntityStorage.php        |  1 +
 src/Form/FieldBlockConfigForm.php | 10 +---------
 src/Plugin/Block/FieldBlock.php   |  9 +--------
 3 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/BlockEntityStorage.php b/src/BlockEntityStorage.php
index dbd30cf..1f16132 100644
--- a/src/BlockEntityStorage.php
+++ b/src/BlockEntityStorage.php
@@ -109,4 +109,5 @@ class BlockEntityStorage extends ConfigEntityStorage {
     $blocks = $this->loadByProperties(['plugin' => "fieldblock:$entity_type"]);
     $this->delete($blocks);
   }
+
 }
diff --git a/src/Form/FieldBlockConfigForm.php b/src/Form/FieldBlockConfigForm.php
index ea14876..a4e5ab0 100644
--- a/src/Form/FieldBlockConfigForm.php
+++ b/src/Form/FieldBlockConfigForm.php
@@ -103,11 +103,10 @@ class FieldBlockConfigForm extends ConfigFormBase {
       }
       else {
         // This entity type no longer exists on the site.
-        $cleanup_options[$entity_type] = $this->t('Missing entity type') . ': ' . $entity_type;
+        $cleanup_options[$entity_type] = $this->t('Missing entity type: @type', ['@type' => $entity_type]);
       }
     }
 
-
     if (!empty($cleanup_options)) {
       $form['cleanup'] = [
         '#type' => 'checkboxes',
@@ -132,13 +131,6 @@ class FieldBlockConfigForm extends ConfigFormBase {
     return array_keys($this->entityManager->getDefinitions());
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function validateForm(array &$form, FormStateInterface $form_state) {
-    parent::validateForm($form, $form_state);
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/src/Plugin/Block/FieldBlock.php b/src/Plugin/Block/FieldBlock.php
index 523b27b..4f2ec88 100644
--- a/src/Plugin/Block/FieldBlock.php
+++ b/src/Plugin/Block/FieldBlock.php
@@ -169,7 +169,7 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface {
    * @param string $field_name
    *   The field name.
    *
-   * @return \Drupal\field\FieldStorageConfigInterface
+   * @return \Drupal\Core\Field\FieldStorageDefinitionInterface
    *   The field storage definition used by this block.
    */
   protected function getFieldStorageDefinition($field_name) {
@@ -307,13 +307,6 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface {
     return $form['settings']['formatter'];
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function blockValidate($form, FormStateInterface $form_state) {
-    parent::blockValidate($form, $form_state);
-  }
-
   /**
    * {@inheritdoc}
    */
-- 
GitLab