code: public function deleteAll()
  	{
  		if ($GLOBALS['TL_DCA'][$this->strTable]['config']['notDeletable'])
  		{
  			throw new InternalServerErrorException('Table "' . $this->strTable . '" is not deletable.');
  		}
  
  		/** @var Session $objSession */
  		$objSession = System::getContainer()->get('session');
  
  		$session = $objSession->all();
  		$ids = $session['CURRENT']['IDS'];
  
  		if (\is_array($ids) && \strlen($ids[0]))
  		{
  			foreach ($ids as $id)
  			{
  				$this->intId = $id;
  				$this->delete(true);
  			}
  		}
  
  		$this->redirect($this->getReferer());
  	}
docs: Delete all selected records
  
  @throws InternalServerErrorException