/** * Transforms an entity to be stored * * @param FileInterface $file File to transform * * @return mixed Entity transformed */ public function transform(FileInterface $file) { return $file->getId() . '.' . $file->getExtension(); }
/** * Transforms an entity to be stored * * @param FileInterface $file File to transform * * @return string Entity transformed */ public function transform(FileInterface $file) { return $file->getPath() . DIRECTORY_SEPARATOR . $file->getId() . '.' . $file->getExtension(); }