ManufacturerWriteService

Implements \ManufacturerWriteServiceInterface

Class ManufacturerWriteService

category

System

package

Manufacturer

Methods

__construct

__construct(\ManufacturerRepositoryInterface $repository, \ImageFileStorage $storage) 

Arguments

Creates manufacturer entity.

createManufacturer() : \Manufacturer

Response

\Manufacturer

New manufacturer entity.

Deletes manufacturer entity from database.

delete(\ManufacturerInterface $manufacturer) : $this|\ManufacturerWriteServiceInterface

Arguments

$manufacturer

\ManufacturerInterface

Manufacturer unit to be deleted.

Response

$this|\ManufacturerWriteServiceInterface

Same instance for chained method calls.

Delete an existing image from filesystem.

deleteImage(\IdType $id) : $this

Arguments

$id

\IdType

manufacturer id to get the image name.

Response

$this

Saves manufacturer entity in database.

save(\ManufacturerInterface $manufacturer) : $this|\ManufacturerWriteServiceInterface

Arguments

$manufacturer

\ManufacturerInterface

Manufacturer unit to be saved.

Response

$this|\ManufacturerWriteServiceInterface

Same instance for chained method calls.

Saves an existing image file with giving name.

saveImage(\ExistingFile $sourceFile, \FilenameStringType $preferredFilename) : $this

Arguments

$sourceFile

\ExistingFile

existing file to save.

$preferredFilename

\FilenameStringType

filename to saving file.

Response

$this

|\ManufacturerWriteServiceInterface Same instance for chained method calls.

If the file is existing ,the filename get an unique id as prefix

unifyFilename(\FilenameStringType $preferredFilename) : \FilenameStringType

Arguments

$preferredFilename

\FilenameStringType

filename of uploaded file.

Response

\FilenameStringType

filename with or without unique id.

Properties

repository

repository : \ManufacturerRepositoryInterface

storage

storage : \ImageFileStorage
var

Type(s)

\ImageFileStorage