sensitive = (boolean) $options['sensitive']; parent::__construct($app); } /** * {@inheritdoc} */ public function check(EntityManager $em, File $file) { $boolean = ! count(\record_adapter::get_records_by_originalname( $file->getCollection()->get_databox(), $file->getOriginalName(), $this->sensitive, 0, 1 )); return new Response($boolean, $this); } /** * {@inheritdoc} */ public static function getMessage() { return _('A file with the same filename already exists in database'); } }