class Document extends AbstractDocument (View source)

Documents entity represent a file on server with datetime and naming.

Properties

protected $id from AbstractEntity
protected DateTime $createdAt from AbstractDateTimed
protected DateTime $updatedAt from AbstractDateTimed
static protected array $mimeToIcon Associate mime type to simple types. from AbstractDocument
protected $rawDocument
protected $raw
protected $embedId
protected $embedPlatform
protected ArrayCollection $nodesSourcesByFields
protected ArrayCollection $tagTranslations
protected $folders
protected ArrayCollection $documentTranslations

Methods

int
getId()

No description

setId(int $id)

No description

getCreatedAt()

No description

setCreatedAt(DateTime $createdAt)

No description

getUpdatedAt()

No description

setUpdatedAt(DateTime $updatedAt)

No description

preUpdate()

No description

prePersist()

No description

resetDates()

Set creation and update date to now.

string
getShortType()

Get short type name for current document Mime type.

string
getShortMimeType()

Get short Mime type.

boolean
isImage()

Is current document an image.

boolean
isSvg()

Is current document a vector SVG file.

boolean
isVideo()

Is current document a video.

boolean
isAudio()

Is current document an audio file.

bool
isPdf()

Is current document a PDF file.

string|null
getRelativeUrl() deprecated

No description

string|null
getRelativePath()

No description

boolean
isEmbed()

Tells if current document has embed media informations.

__construct()

AbstractDocument constructor.

string
getFilename()

No description

setFilename(string $filename)

No description

string
getMimeType()

No description

setMimeType(string $mimeType)

No description

string
getFolder()

No description

setFolder(string $folder)

Set folder name.

string
getEmbedId()

No description

setEmbedId(string $embedId)

No description

string
getEmbedPlatform()

No description

setEmbedPlatform(string $embedPlatform)

No description

boolean
isPrivate()

No description

setPrivate(boolean $private)

No description

ArrayCollection
getNodesSourcesByFields()

No description

ArrayCollection
getTagTranslations()

No description

Collection
getFolders()

No description

addFolder(FolderInterface $folder)

No description

ArrayCollection
getDocumentTranslations()

No description

Collection
getDocumentTranslationsByTranslation(Translation $translation)

No description

$this
addDocumentTranslation(DocumentTranslation $documentTranslation)

No description

bool
hasTranslations()

No description

getRawDocument()

Gets the value of rawDocument.

setRawDocument(DocumentInterface $rawDocument = null)

Sets the value of rawDocument.

boolean
isRaw()

Is document a raw one.

setRaw(boolean $raw)

Sets the value of raw.

getDownscaledDocument()

Gets the downscaledDocument.

__clone()

Clone current document.

Details

int getId()

Return Value

int

AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

DateTime getCreatedAt()

Return Value

DateTime

AbstractDateTimed setCreatedAt(DateTime $createdAt)

Parameters

DateTime $createdAt

Return Value

AbstractDateTimed

DateTime getUpdatedAt()

Return Value

DateTime

AbstractDateTimed setUpdatedAt(DateTime $updatedAt)

Parameters

DateTime $updatedAt

Return Value

AbstractDateTimed

preUpdate()

prePersist()

AbstractEntity resetDates()

Set creation and update date to now.

Return Value

AbstractEntity

string getShortType()

Get short type name for current document Mime type.

Return Value

string

string getShortMimeType()

Get short Mime type.

Return Value

string

boolean isImage()

Is current document an image.

Return Value

boolean

boolean isSvg()

Is current document a vector SVG file.

Return Value

boolean

boolean isVideo()

Is current document a video.

Return Value

boolean

boolean isAudio()

Is current document an audio file.

Return Value

boolean

bool isPdf()

Is current document a PDF file.

Return Value

bool

string|null getRelativeUrl() deprecated

deprecated Use getRelativePath instead, naming is better.

Return Value

string|null

string|null getRelativePath()

Return Value

string|null

boolean isEmbed()

Tells if current document has embed media informations.

Return Value

boolean

__construct()

AbstractDocument constructor.

string getFilename()

Return Value

string

DocumentInterface setFilename(string $filename)

Parameters

string $filename

Return Value

DocumentInterface

string getMimeType()

Return Value

string

DocumentInterface setMimeType(string $mimeType)

Parameters

string $mimeType

Return Value

DocumentInterface

string getFolder()

Return Value

string

DocumentInterface setFolder(string $folder)

Set folder name.

Parameters

string $folder

Return Value

DocumentInterface

string getEmbedId()

Return Value

string

DocumentInterface setEmbedId(string $embedId)

Parameters

string $embedId

Return Value

DocumentInterface

string getEmbedPlatform()

Return Value

string

DocumentInterface setEmbedPlatform(string $embedPlatform)

Parameters

string $embedPlatform

Return Value

DocumentInterface

boolean isPrivate()

Return Value

boolean

DocumentInterface setPrivate(boolean $private)

Parameters

boolean $private

Return Value

DocumentInterface

ArrayCollection getNodesSourcesByFields()

Return Value

ArrayCollection

ArrayCollection getTagTranslations()

Return Value

ArrayCollection

Collection getFolders()

Return Value

Collection

DocumentInterface addFolder(FolderInterface $folder)

Parameters

FolderInterface $folder

Return Value

DocumentInterface

DocumentInterface removeFolder(FolderInterface $folder)

Parameters

FolderInterface $folder

Return Value

DocumentInterface

ArrayCollection getDocumentTranslations()

Return Value

ArrayCollection

Collection getDocumentTranslationsByTranslation(Translation $translation)

Parameters

Translation $translation

Return Value

Collection

$this addDocumentTranslation(DocumentTranslation $documentTranslation)

Parameters

DocumentTranslation $documentTranslation

Return Value

$this

bool hasTranslations()

Return Value

bool

DocumentInterface|null getRawDocument()

Gets the value of rawDocument.

Return Value

DocumentInterface|null

DocumentInterface setRawDocument(DocumentInterface $rawDocument = null)

Sets the value of rawDocument.

Parameters

DocumentInterface $rawDocument the raw document

Return Value

DocumentInterface

boolean isRaw()

Is document a raw one.

Return Value

boolean

DocumentInterface setRaw(boolean $raw)

Sets the value of raw.

Parameters

boolean $raw the raw

Return Value

DocumentInterface

DocumentInterface|null getDownscaledDocument()

Gets the downscaledDocument.

Return Value

DocumentInterface|null

__clone()

Clone current document.