public function deleteAllMappingsByType($type, $chunk_size = 25) {
    $ids = $this->queryFactory
      ->get('mapping')
      ->condition('type', $type)
      ->execute();

    if (!$ids) {
      return;
    }

    $chunks = array_chunk($ids, $chunk_size);
    foreach ($chunks as $chunk) {
      $entities = $this->storageMapping->loadMultiple($chunk);
      $this->storageMapping->delete($entities);
    }
  }
public function deleteAllMappingsByType($type, $chunk_size = 25) {
    $ids = $this->queryFactory
      ->get('mapping')
      ->condition('type', $type)
      ->execute();

    if (!$ids) {
      return;
    }

    $chunks = array_chunk($ids, $chunk_size);
    foreach ($chunks as $chunk) {
      $entities = $this->storageMapping->loadMultiple($chunk);
      $this->storageMapping->delete($entities);
    }
  }
public function deleteAllMappingsByType ( $ type , $ chunk_size = 25 ) { $ ids = $ this -> queryFactory -> get ( 'mapping' ) -> condition ( 'type' , $ type ) -> execute ( ) ; if ( ! $ ids ) { return ; } $ chunks = array_chunk ( $ ids , $ chunk_size ) ; foreach ( $ chunks as $ chunk ) { $ entities = $ this -> storageMapping -> loadMultiple ( $ chunk ) ; $ this -> storageMapping -> delete ( $ entities ) ; } }
Delete all mappings by type.

@param string $type
Mapping type.
@param int $chunk_size
Chunk size.
Delete all mappings by type .