Landing
Table of Contents
Methods
- add() : PublicActionResult
- Create new landing.
- addBlock() : PublicActionResult
- Add new block to the landing.
- addByTemplate() : PublicActionResult
- Create a page by template.
- copy() : PublicActionResult
- Copy landing.
- copyBlock() : PublicActionResult
- Copy other block to this landing.
- delete() : PublicActionResult
- Delete landing.
- deleteBlock() : PublicActionResult
- Delete the block from the landing.
- downBlock() : PublicActionResult
- Sort down the block on the landing.
- favoriteBlock() : PublicActionResult
- Save the block in favorites.
- getAdditionalFields() : PublicActionResult
- Get additional fields of landing.
- getList() : PublicActionResult
- Get available landings.
- getPreview() : PublicActionResult
- Get preview picture of landing.
- getPublicUrl() : PublicActionResult
- Get public url of landing.
- hideBlock() : PublicActionResult
- Dectivate the block on the landing.
- markDelete() : PublicActionResult
- Mark entity as deleted.
- markDeletedBlock() : PublicActionResult
- Mark delete or not the block.
- markUnDelete() : PublicActionResult
- Mark entity as undeleted.
- markUnDeletedBlock() : PublicActionResult
- Mark undelete the block.
- move() : PublicActionResult
- Move the page to site/folder.
- moveBlock() : PublicActionResult
- Move other block to this landing.
- publication() : PublicActionResult
- Publication of landing.
- removeEntities() : PublicActionResult
- Remove entities of Landing - images / blocks.
- resolveIdByPublicUrl() : PublicActionResult
- Returns landing id resolves by landing public url.
- showBlock() : PublicActionResult
- Activate the block on the landing.
- unFavoriteBlock() : PublicActionResult
- Remove block from favorites. Only if block created by current user.
- unpublic() : PublicActionResult
- Cancel publication of landing.
- upBlock() : PublicActionResult
- Sort up the block on the landing.
- update() : PublicActionResult
- Update landing.
- updateHead() : PublicActionResult
- Set some content to the Head section.
- uploadFile() : PublicActionResult
- Upload file by url or from FILE.
Methods
add()
Create new landing.
public
static add(array<string|int, mixed> $fields) : PublicActionResult
Parameters
- $fields : array<string|int, mixed>
-
Landing data.
Return values
PublicActionResultaddBlock()
Add new block to the landing.
public
static addBlock(int $lid, array<string|int, mixed> $fields[, bool $preventHistory = false ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $fields : array<string|int, mixed>
-
Data array of block.
- $preventHistory : bool = false
-
True if no need save history
Return values
PublicActionResultaddByTemplate()
Create a page by template.
public
static addByTemplate(int $siteId, string $code[, array<string|int, mixed> $fields = [] ]) : PublicActionResult
Parameters
- $siteId : int
-
Site id.
- $code : string
-
Code of template.
- $fields : array<string|int, mixed> = []
-
Landing fields.
Return values
PublicActionResultcopy()
Copy landing.
public
static copy(int $lid[, int|null $toSiteId = null ][, int|null $toFolderId = null ][, bool $skipSystem = false ]) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $toSiteId : int|null = null
-
Site id (if you want copy in another site).
- $toFolderId : int|null = null
-
Folder id (if you want copy in some folder).
- $skipSystem : bool = false
-
If true, don't copy system flag.
Return values
PublicActionResultcopyBlock()
Copy other block to this landing.
public
static copyBlock(int $lid, int $block[, array<string|int, mixed> $params = array() ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
- $params : array<string|int, mixed> = array()
-
Params array.
Return values
PublicActionResultdelete()
Delete landing.
public
static delete(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
Return values
PublicActionResultdeleteBlock()
Delete the block from the landing.
public
static deleteBlock(int $lid, int $block) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
Return values
PublicActionResultdownBlock()
Sort down the block on the landing.
public
static downBlock(int $lid, int $block[, bool $preventHistory = false ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
- $preventHistory : bool = false
-
True if no need save history
Return values
PublicActionResultfavoriteBlock()
Save the block in favorites.
public
static favoriteBlock(int $lid, int $block[, array<string|int, mixed> $meta = [] ]) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $block : int
-
Block id.
- $meta : array<string|int, mixed> = []
-
Meta info.
Return values
PublicActionResultgetAdditionalFields()
Get additional fields of landing.
public
static getAdditionalFields(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
Return values
PublicActionResultgetList()
Get available landings.
public
static getList([array<string|int, mixed> $params = [] ]) : PublicActionResult
Parameters
- $params : array<string|int, mixed> = []
-
Params ORM array.
Return values
PublicActionResultgetPreview()
Get preview picture of landing.
public
static getPreview(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
Return values
PublicActionResultgetPublicUrl()
Get public url of landing.
public
static getPublicUrl(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
Return values
PublicActionResulthideBlock()
Dectivate the block on the landing.
public
static hideBlock(int $lid, int $block) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
Return values
PublicActionResultmarkDelete()
Mark entity as deleted.
public
static markDelete(int $lid[, bool $mark = true ]) : PublicActionResult
Parameters
- $lid : int
-
Entity id.
- $mark : bool = true
-
Mark.
Return values
PublicActionResultmarkDeletedBlock()
Mark delete or not the block.
public
static markDeletedBlock(int $lid, int $block[, bool $mark = true ][, bool $preventHistory = false ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
- $mark : bool = true
-
Mark.
- $preventHistory : bool = false
-
True if no need save history
Return values
PublicActionResultmarkUnDelete()
Mark entity as undeleted.
public
static markUnDelete(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Entity id.
Return values
PublicActionResultmarkUnDeletedBlock()
Mark undelete the block.
public
static markUnDeletedBlock(int $lid, int $block[, bool $preventHistory = false ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
- $preventHistory : bool = false
-
True if no need save history
Return values
PublicActionResultmove()
Move the page to site/folder.
public
static move(int $lid[, int|null $toSiteId = null ][, int|null $toFolderId = null ]) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $toSiteId : int|null = null
-
Site id.
- $toFolderId : int|null = null
-
Folder id (optional).
Return values
PublicActionResultmoveBlock()
Move other block to this landing.
public
static moveBlock(int $lid, int $block[, array<string|int, mixed> $params = array() ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
- $params : array<string|int, mixed> = array()
-
Params array.
Return values
PublicActionResultpublication()
Publication of landing.
public
static publication(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
Return values
PublicActionResultremoveEntities()
Remove entities of Landing - images / blocks.
public
static removeEntities(int $lid, array<string|int, mixed> $data) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $data : array<string|int, mixed>
-
Data for remove.
Return values
PublicActionResultresolveIdByPublicUrl()
Returns landing id resolves by landing public url.
public
static resolveIdByPublicUrl(string $landingUrl, int $siteId) : PublicActionResult
Parameters
- $landingUrl : string
-
Landing public url.
- $siteId : int
-
Landing's site id.
Return values
PublicActionResultshowBlock()
Activate the block on the landing.
public
static showBlock(int $lid, int $block) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
Return values
PublicActionResultunFavoriteBlock()
Remove block from favorites. Only if block created by current user.
public
static unFavoriteBlock(int $blockId) : PublicActionResult
Parameters
- $blockId : int
-
- id of deleted block
Return values
PublicActionResultunpublic()
Cancel publication of landing.
public
static unpublic(int $lid) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
Return values
PublicActionResultupBlock()
Sort up the block on the landing.
public
static upBlock(int $lid, int $block[, bool $preventHistory = false ]) : PublicActionResult
Parameters
- $lid : int
-
Id of landing.
- $block : int
-
Block id.
- $preventHistory : bool = false
-
True if no need save history
Return values
PublicActionResultupdate()
Update landing.
public
static update(int $lid, array<string|int, mixed> $fields) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $fields : array<string|int, mixed>
-
Landing new data.
Return values
PublicActionResultupdateHead()
Set some content to the Head section.
public
static updateHead(int $lid, string $content) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $content : string
-
Some content.
Return values
PublicActionResultuploadFile()
Upload file by url or from FILE.
public
static uploadFile(int $lid, string $picture[, string $ext = false ][, array<string|int, mixed> $params = array() ]) : PublicActionResult
Parameters
- $lid : int
-
Landing id.
- $picture : string
-
File url / file array.
- $ext : string = false
-
File extension.
- $params : array<string|int, mixed> = array()
-
Some file params.