public function performAction(ElementQueryInterface $query): bool
    {
        try {
            foreach ($query->all() as $asset) {
                Plugin::$plugin->imager->removeTransformsForAsset($asset);
            }
        } catch (Exception $exception) {
            $this->setMessage($exception->getMessage());
            return false;
        }
        
        $this->setMessage(Craft::t('imager', 'Transforms were removed'));
        return true;
    }
public function performAction(ElementQueryInterface $query): bool
    {
        try {
            foreach ($query->all() as $asset) {
                Plugin::$plugin->imager->removeTransformsForAsset($asset);
            }
        } catch (Exception $exception) {
            $this->setMessage($exception->getMessage());
            return false;
        }
        
        $this->setMessage(Craft::t('imager', 'Transforms were removed'));
        return true;
    }
public function performAction ( ElementQueryInterface $ query ) : bool { try { foreach ( $ query -> all ( ) as $ asset ) { Plugin :: $ plugin -> imager -> removeTransformsForAsset ( $ asset ) ; } } catch ( Exception $ exception ) { $ this -> setMessage ( $ exception -> getMessage ( ) ) ; return false ; } $ this -> setMessage ( Craft :: t ( 'imager' , 'Transforms were removed' ) ) ; return true ; }
Clears transforms for selected assets

@param ElementQueryInterface $query

@return bool
Clears transforms for selected assets