Constants

PROPERTY_STRICT

PROPERTY_STRICT

Strict: Property, Setter and Getter must be defined.

PROPERTY_GETTER

PROPERTY_GETTER

Getter: Property and Getter must be defined.

PROPERTY_SETTER

PROPERTY_SETTER

Setter: Property and Setter must be defined.

PROPERTY_FACILE

PROPERTY_FACILE

Facile: Only the property must be defined.

PERMISSION_SUBSEQUENT_ATTACHMENT_UPLOAD

PERMISSION_SUBSEQUENT_ATTACHMENT_UPLOAD

Methods

notEmpty()

notEmpty(string $property, array $args) : bool

Checks, wether a property is not empty.

Uses the getter method of the property to fetch its value, passing the $args to the method.

A property is considered empty, if its value

  • is null,
  • is a scalar and \empty() returns true,
  • is an empty array, or
  • is an object implementing \Countable and ::count() is 0.

in all other cases the property is considered to be not empty.

Parameters

string $property
array $args

Arguments to be passed to the getter method.

Throws

\Core\Entity\Exception\OutOfBoundsException

if the property does not exists.

Returns

bool

hasProperty()

hasProperty(string $property, bool|string $mode) : bool

Checks, if this entity has a property.

The property must be defined, and additionally one of the following condition must be met, dependent on $mode:

  • self::PROPERTY_STRICT: A getter AND a setter method must be available.
  • self::PROPERTY_GETTER: Only a getter must be available.
  • self::PROPERTY_SETTER: Only a setter must be available.
  • self::PROPERTY_FACILE: No additional conditions.

Parameters

string $property
bool|string $mode

Returns

bool

setId()

setId(mixed $id)

Sets the id.

Parameters

mixed $id

getId()

getId() : mixed

Gets the id.

Returns

mixed

getSearchableProperties()

getSearchableProperties() : array

Returns

array —

searchable properties names.

setKeywords()

setKeywords(array $keywords)

Parameters

array $keywords

clearKeywords()

clearKeywords()

getKeywords()

getKeywords()

setDateCreated()

setDateCreated(\DateTime|\Doctrine\ODM\MongoDB\Event\LifecycleEventArgs|null $date) : \Core\Entity\ModificationDateAwareEntityInterface

Sets the creation date.

Parameters

\DateTime|\Doctrine\ODM\MongoDB\Event\LifecycleEventArgs|null $date

Throws

\InvalidArgumentException

Returns

\Core\Entity\ModificationDateAwareEntityInterface

getDateCreated()

getDateCreated() : \DateTime|null

Gets the creation date.

Returns

\DateTime|null

setDateModified()

setDateModified(\DateTime|\Doctrine\ODM\MongoDB\Event\LifecycleEventArgs|string|null $date) : \Core\Entity\ModificationDateAwareEntityInterface

Sets the modification date.

Parameters

\DateTime|\Doctrine\ODM\MongoDB\Event\LifecycleEventArgs|string|null $date

Throws

\InvalidArgumentException

Returns

\Core\Entity\ModificationDateAwareEntityInterface

getDateModified()

getDateModified() : \DateTime|null

Gets the modification date.

Returns

\DateTime|null

setPermissions()

setPermissions(\Core\Entity\PermissionsInterface $permissions) : self

Sets the permissions entity.

Parameters

\Core\Entity\PermissionsInterface $permissions

Returns

self

getUser()

getUser() : \Auth\Entity\UserInterface|null

Gets the user who created this application.

May be null.

Returns

\Auth\Entity\UserInterface|null

setStatus()

setStatus(\Applications\Entity\StatusInterface|string $status) : \Applications\Entity\ApplicationInterface

Sets the status of this application.

If $status is a string, a new {@link \Applications\Entity\Status} instance is created with $status as status name.

Parameters

\Applications\Entity\StatusInterface|string $status

Returns

\Applications\Entity\ApplicationInterface

getSummary()

getSummary() : string

Gets the summary

Returns

string

getCv()

getCv() : \Cv\Entity\CvInterface

Gets the CV

Returns

\Cv\Entity\CvInterface

setAttachments()

setAttachments(\Doctrine\Common\Collections\Collection $attachments) : \Applications\Entity\ApplicationInterface

Sets attachments collection.

Parameters

\Doctrine\Common\Collections\Collection $attachments

Returns

\Applications\Entity\ApplicationInterface

getAttachments()

getAttachments() : \Doctrine\Common\Collections\Collection

Gets the collection of attachments.

Returns

\Doctrine\Common\Collections\Collection

setProfiles()

setProfiles(\Doctrine\Common\Collections\Collection $profiles) : \Applications\Entity\ApplicationInterface

Sets social profiles collection.

Parameters

\Doctrine\Common\Collections\Collection $profiles

Returns

\Applications\Entity\ApplicationInterface

getProfiles()

getProfiles() : \Doctrine\Common\Collections\Collection

Gets social profiles collection.

Returns

\Doctrine\Common\Collections\Collection

setHistory()

setHistory(\Doctrine\Common\Collections\Collection $history) : \Applications\Entity\ApplicationInterface

Sets the collection of history entities.

Parameters

\Doctrine\Common\Collections\Collection $history

Returns

\Applications\Entity\ApplicationInterface

getHistory()

getHistory() : \Doctrine\Common\Collections\Collection

Gets the collection of history entities.

Returns

\Doctrine\Common\Collections\Collection

setReadBy()

setReadBy(array $userIds) : \Applications\Entity\ApplicationInterface

Sets the array of user ids of users which has at least once viewed this application.

Parameters

array $userIds

Returns

\Applications\Entity\ApplicationInterface

getReadBy()

getReadBy() : array

Gets the array of user ids of users which has at least once viewed this application.

Returns

array

isUnreadBy()

isUnreadBy(\Auth\Entity\UserInterface|string $userOrId) : bool

Checks, if a user (id) has not yet read this application.

Parameters

\Auth\Entity\UserInterface|string $userOrId

Returns

bool

isReadBy()

isReadBy(\Auth\Entity\UserInterface|string $userOrId) : bool

Checks, if a user (id) has read this application.

Parameters

\Auth\Entity\UserInterface|string $userOrId

Returns

bool

getComments()

getComments() : \Applications\Entity\ArrayCollection;

Gets all comments for the application.

Returns

\Applications\Entity\ArrayCollection;

getRating()

getRating(bool $recalculate) : int

Gets the average rating of all comments.

Parameters

bool $recalculate

Returns

int

getAttributes()

getAttributes() : \Applications\Entity\ArrayCollection;

Gets all attributes for an application.

Returns

\Applications\Entity\ArrayCollection;