public function removeByLocationIdAndClassId($locationId, $classId) {
    $query = $this->db->select('openy_pef_gxp_mapping', 'm')
      ->condition('location_id', $locationId)
      ->condition('product_id', $classId)
      ->fields('m', ['id']);

    $ids = $query->execute()->fetchCol();
    if (!$ids) {
      return;
    }

    $this->removeByChunk($ids);
  }
public function removeByLocationIdAndClassId($locationId, $classId) {
    $query = $this->db->select('openy_pef_gxp_mapping', 'm')
      ->condition('location_id', $locationId)
      ->condition('product_id', $classId)
      ->fields('m', ['id']);

    $ids = $query->execute()->fetchCol();
    if (!$ids) {
      return;
    }

    $this->removeByChunk($ids);
  }
public function removeByLocationIdAndClassId ( $ locationId , $ classId ) { $ query = $ this -> db -> select ( 'openy_pef_gxp_mapping' , 'm' ) -> condition ( 'location_id' , $ locationId ) -> condition ( 'product_id' , $ classId ) -> fields ( 'm' , [ 'id' ] ) ; $ ids = $ query -> execute ( ) -> fetchCol ( ) ; if ( ! $ ids ) { return ; } $ this -> removeByChunk ( $ ids ) ; }
Remove mapping entities by location & class.

Also removes referenced classes.

@param int $locationId
Location ID.
@param int $classId
Class ID.

@throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
@throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
@throws \Drupal\Core\Entity\EntityStorageException
Remove mapping entities by location & class .