You are here

public function GoogleAnalyticsCounterCustomFieldGenerator::gacDeleteFieldStorage in Google Analytics Counter 8.3

Deletes the field storage configurations.

Return value

null|void

Throws

\Drupal\Core\Entity\EntityStorageException

Overrides GoogleAnalyticsCounterCustomFieldGeneratorInterface::gacDeleteFieldStorage

See also

GoogleAnalyticsCounterConfigureTypesForm

File

src/GoogleAnalyticsCounterCustomFieldGenerator.php, line 229

Class

GoogleAnalyticsCounterCustomFieldGenerator
Defines the Google Analytics Counter custom field generator.

Namespace

Drupal\google_analytics_counter

Code

public function gacDeleteFieldStorage() {
  $field_storage = FieldStorageConfig::loadByName('node', 'field_google_analytics_counter');
  if (!empty($field_storage)) {
    $field_storage
      ->delete();
  }
}