src/Common/Model/Base.php
public function deleteMany(array $aIds): bool
    {
        $oDb = Factory::service('Database');
        try {
            $oDb->trans_begin();
            foreach ($aIds as $iId) {
                if (!$this->delete($iId)) {
                    throw new ModelException('Failed to delete item with ID ' . $iId);
                }
            }
            $oDb->trans_commit();
            return true;
        } catch (\Exception $e) {
            $oDb->trans_rollback();
            $this->setError($e->getMessage());
            return false;
        }
    }
public function deleteMany(array $aIds): bool
    {
        $oDb = Factory::service('Database');
        try {
            $oDb->trans_begin();
            foreach ($aIds as $iId) {
                if (!$this->delete($iId)) {
                    throw new ModelException('Failed to delete item with ID ' . $iId);
                }
            }
            $oDb->trans_commit();
            return true;
        } catch (\Exception $e) {
            $oDb->trans_rollback();
            $this->setError($e->getMessage());
            return false;
        }
    }
public function deleteMany ( array $ aIds ) : bool { $ oDb = Factory :: service ( 'Database' ) ; try { $ oDb -> trans_begin ( ) ; foreach ( $ aIds as $ iId ) { if ( ! $ this -> delete ( $ iId ) ) { throw new ModelException ( 'Failed to delete item with ID ' . $ iId ) ; } } $ oDb -> trans_commit ( ) ; return true ; } catch ( \ Exception $ e ) { $ oDb -> trans_rollback ( ) ; $ this -> setError ( $ e -> getMessage ( ) ) ; return false ; } }
Deletes many items

@param array $aIds An array of item IDs to delete

@return bool
@throws FactoryException
@throws ModelException
Deletes many items