opentalentImageService = $opentalentImageService; } /** * -- This method is expected by Fluid -- * Declares the viewhelper's parameters */ public function initializeArguments() { $this->registerArgument( 'fileId', 'int', 'The id of the File object', true ); $this->registerArgument( 'size', 'string', 'The expected size (sm, md, or lg)', false, 'md' ); } /** * -- This method is expected by Fluid -- * Renders the content as html * * @return string Rendered tag */ public function render() { $fileId = $this->arguments['fileId']; $size = $this->arguments['size']; return $this->opentalentImageService->getImageUrl($fileId, $size); } }