public function deleteImportedContent() {
    $uuids = $this->state->get('govcms8_default_content_uuids', []);
    $by_entity_type = array_reduce(array_keys($uuids), function ($carry, $uuid) use ($uuids) {
      $entity_type_id = $uuids[$uuid];
      $carry[$entity_type_id][] = $uuid;
      return $carry;
    }, []);
    foreach ($by_entity_type as $entity_type_id => $entity_uuids) {
      $storage = $this->entityTypeManager->getStorage($entity_type_id);
      $entities = $storage->loadByProperties(['uuid' => $entity_uuids]);
      $storage->delete($entities);
    }
    return $this;
  }
public function deleteImportedContent() {
    $uuids = $this->state->get('govcms8_default_content_uuids', []);
    $by_entity_type = array_reduce(array_keys($uuids), function ($carry, $uuid) use ($uuids) {
      $entity_type_id = $uuids[$uuid];
      $carry[$entity_type_id][] = $uuid;
      return $carry;
    }, []);
    foreach ($by_entity_type as $entity_type_id => $entity_uuids) {
      $storage = $this->entityTypeManager->getStorage($entity_type_id);
      $entities = $storage->loadByProperties(['uuid' => $entity_uuids]);
      $storage->delete($entities);
    }
    return $this;
  }
public function deleteImportedContent ( ) { $ uuids = $ this -> state -> get ( 'govcms8_default_content_uuids' , [ ] ) ; $ by_entity_type = array_reduce ( array_keys ( $ uuids ) , function ( $ carry , $ uuid ) use ( $ uuids ) { $ entity_type_id = $ uuids [ $ uuid ] ; $ carry [ $ entity_type_id ] [ ] = $ uuid ; return $ carry ; } , [ ] ) ; foreach ( $ by_entity_type as $ entity_type_id => $ entity_uuids ) { $ storage = $ this -> entityTypeManager -> getStorage ( $ entity_type_id ) ; $ entities = $ storage -> loadByProperties ( [ 'uuid' => $ entity_uuids ] ) ; $ storage -> delete ( $ entities ) ; } return $ this ; }
Deletes any content imported by this module.

@return $this
Deletes any content imported by this module .