UrlItem extends BaseLinkItem uses MigrationStatusCheckerTrait
Table of Contents
Methods
- __construct() : mixed
- delete() : Result
- Drops object from database.
- fill() : static
- Fills object's fields with provided values.
- fillActual() : self
- getAuthorId() : int
- getChatId() : int
- getDataClass() : string
- Returns ORM tablet class name.
- getDataEntity() : EntityObject
- getDateCreate() : DateTime
- getEntity() : Entity|UrlItem
- getEntityClassName() : string|RestEntity
- Returns the class name of the entity that the link contains.
- getEntityId() : int|null
- Returns the ID of the entity that the link contains.
- getId() : int|null
- getMessageId() : int|null
- getPopupData() : PopupData
- Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
- getPrimaryId() : int|null
- getRegistry() : Registry|null
- Return link of the object's registry.
- getRestEntityName() : string
- Returns the name of the entity that will be used in the rest response
- getUrl() : string
- isChanged() : bool
- Tells true if object has been changed.
- isDeleted() : bool
- Tells true if object marked to drop.
- linkEntityToMessage() : static
- load() : Result
- markChanged() : static
- Marks object changed.
- markDrop() : static
- Marks object to drop on save.
- offsetExists() : bool
- offsetGet() : mixed
- offsetSet() : void
- offsetUnset() : void
- onAfterOrmUpdate() : self
- prepareFields() : Result
- save() : Result
- Saves object state into database.
- setAuthorId() : BaseLinkItem
- setChatId() : BaseLinkItem
- setDateCreate() : BaseLinkItem
- setEntity() : static
- setEntityId() : BaseLinkItem
- setId() : BaseLinkItem
- setMessageId() : BaseLinkItem
- setMessageInfo() : static
- Associates the entity with the passed message by filling in the messageId, chatId and authorId
- setPrimaryId() : self
- setRegistry() : self
- setUrl() : self
- toArray() : array<string|int, mixed>
- Returns object state as array.
- toRestFormat() : array<string|int, mixed>|null
- Returns an array in JSON like format to return the entity as a rest response.
- toRestFormatIdOnly() : array<string|int, mixed>
- Returns an array containing the id of the link and the id of the linked entity, or an array of such arrays
Methods
__construct()
public
__construct([int|array<string|int, mixed>|EO_LinkUrl|null $source = null ]) : mixed
Parameters
- $source : int|array<string|int, mixed>|EO_LinkUrl|null = null
delete()
Drops object from database.
public
delete() : Result
Return values
Resultfill()
Fills object's fields with provided values.
public
fill(array<string|int, mixed> $source) : static
Parameters
- $source : array<string|int, mixed>
Return values
staticfillActual()
public
fillActual(array<string|int, mixed> $fieldsToFill) : self
Parameters
- $fieldsToFill : array<string|int, mixed>
Return values
selfgetAuthorId()
public
getAuthorId() : int
Return values
intgetChatId()
public
getChatId() : int
Return values
intgetDataClass()
Returns ORM tablet class name.
public
static getDataClass() : string
Return values
stringgetDataEntity()
public
getDataEntity() : EntityObject
Return values
EntityObjectgetDateCreate()
public
getDateCreate() : DateTime
Return values
DateTimegetEntity()
public
getEntity() : Entity|UrlItem
Return values
Entity|UrlItemgetEntityClassName()
Returns the class name of the entity that the link contains.
public
static getEntityClassName() : string|RestEntity
Return values
string|RestEntitygetEntityId()
Returns the ID of the entity that the link contains.
public
getEntityId() : int|null
Return values
int|nullgetId()
public
getId() : int|null
Return values
int|nullgetMessageId()
public
getMessageId() : int|null
Return values
int|nullgetPopupData()
Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
public
getPopupData([array<string|int, mixed> $excludedList = [] ]) : PopupData
Parameters
- $excludedList : array<string|int, mixed> = []
Return values
PopupDatagetPrimaryId()
public
getPrimaryId() : int|null
Return values
int|nullgetRegistry()
Return link of the object's registry.
public
getRegistry() : Registry|null
Return values
Registry|nullgetRestEntityName()
Returns the name of the entity that will be used in the rest response
public
static getRestEntityName() : string
Return values
stringgetUrl()
public
getUrl() : string
Return values
stringisChanged()
Tells true if object has been changed.
public
isChanged() : bool
Return values
boolisDeleted()
Tells true if object marked to drop.
public
isDeleted() : bool
Return values
boollinkEntityToMessage()
public
static linkEntityToMessage(RestEntity $entity, Message $message) : static
Parameters
- $entity : RestEntity
- $message : Message
Return values
staticload()
public
load(int|array<string|int, mixed>|EntityObject $source) : Result
Parameters
- $source : int|array<string|int, mixed>|EntityObject
Return values
ResultmarkChanged()
Marks object changed.
public
markChanged([bool|null $state = null ]) : static
Parameters
- $state : bool|null = null
Return values
staticmarkDrop()
Marks object to drop on save.
public
markDrop() : static
Return values
staticoffsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
onAfterOrmUpdate()
public
onAfterOrmUpdate(array<string|int, mixed> $fields) : self
Parameters
- $fields : array<string|int, mixed>
Return values
selfprepareFields()
public
prepareFields() : Result
Return values
Resultsave()
Saves object state into database.
public
save() : Result
Return values
ResultsetAuthorId()
public
setAuthorId(int $authorId) : BaseLinkItem
Parameters
- $authorId : int
Return values
BaseLinkItemsetChatId()
public
setChatId(int $chatId) : BaseLinkItem
Parameters
- $chatId : int
Return values
BaseLinkItemsetDateCreate()
public
setDateCreate(DateTime $dateCreate) : BaseLinkItem
Parameters
- $dateCreate : DateTime
Return values
BaseLinkItemsetEntity()
public
setEntity(RestEntity|UrlItem $entity) : static
Parameters
- $entity : RestEntity|UrlItem
Return values
staticsetEntityId()
public
setEntityId(int|null $entityId) : BaseLinkItem
Parameters
- $entityId : int|null
Return values
BaseLinkItemsetId()
public
setId(int $id) : BaseLinkItem
Parameters
- $id : int
Return values
BaseLinkItemsetMessageId()
public
setMessageId(int|null $messageId) : BaseLinkItem
Parameters
- $messageId : int|null
Return values
BaseLinkItemsetMessageInfo()
Associates the entity with the passed message by filling in the messageId, chatId and authorId
public
setMessageInfo(Message $message) : static
Parameters
- $message : Message
Return values
staticsetPrimaryId()
public
setPrimaryId(int $primaryId) : self
Parameters
- $primaryId : int
Return values
selfsetRegistry()
public
setRegistry(Registry $registry) : self
Parameters
- $registry : Registry
Return values
selfsetUrl()
public
setUrl(string $url) : self
Parameters
- $url : string
Return values
selftoArray()
Returns object state as array.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toRestFormat()
Returns an array in JSON like format to return the entity as a rest response.
public
toRestFormat([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>|null
Parameters
- $option : array<string|int, mixed> = []
Return values
array<string|int, mixed>|nulltoRestFormatIdOnly()
Returns an array containing the id of the link and the id of the linked entity, or an array of such arrays
public
toRestFormatIdOnly() : array<string|int, mixed>