getRepo()->findByPublicIdsWithTrashed($ids); foreach ($entities as $entity) { $this->getRepo()->$action($entity, $param); } return count($entities); } }