An entry is a structure which holds content through use of an EntryLanguageApi which can exist for any of the project's languages.

Constructor

@:keepnew (entry:Entry, api:Api)

Variables

@:keepread onlyallRightsRequiredToRemove:Bool

Depreceated** Use locked instead.

@:keepread onlyallow_channels:String

Whitelist channel keys which can be used to create new entries

@:keepread onlyallow_children:Bool

Allows creation of new subentries

@:keepread onlychannel:String

An array of channel keys, only entries of these channels can be created

@:keepread onlyfilepath:String

The filepath that is used by this entry to store newly uploaded images/files

@:keepread onlyhide:Bool

Hides the entry in the menu if set

@:keepread onlyhide_children:Null<Bool>

Hides the children of this entry in the menu if set

@:keepread onlyid:Int

Get the entry id

@:keepread onlyidentifier:Null<String>

An optional identifier

@:keepread onlyinherit_filepath:Bool

Uses the filepath of the parent entry if set or empty filepath if root

@:keepread onlyisRoot:Bool

Check if this a root entry (no parent entry)

@:keepread onlykey:Null<String>

An optional key which can be used in the frontend to retrieve a page

@:keepread onlylocked:Bool

This entry can only be removed by admins and is forced to always have a published version

@:keepread onlyorder:Int

Returns the order of the entry relative to other entries under the same parent

@:keepread onlyorder_by:OrderBy

Can be: "alpha" for alphabetical order, "date" to sort on date, or "default" to let the user sort

@:keepread onlyparentsIDs:Array<Int>

Get the ID's of all parent entries

@:keepread onlysort:SortDirection

Can be: "asc" for ascending order, or "desc" for descending order

Methods

@:keepaddEntry (data:EntryRequest):EntryApi

Create a new sub entry

@:keepaddFile (path:String):FileApi

Add a file. The file should be placed in the storage and path looks like "storage/projectName/myFile.pdf"

@:keepgetChildWithPath (path:String, language:String):EntryApi

Get child with specified (local) path

@:has_untyped@:keepgetChildren ():Array<EntryApi>

Get this entry's child entries

@:has_untyped@:keepgetFiles ():Array<FileApi>

Get files attached to this entry

@:keepgetFullPath (lang:String):String

Get the entry's full path for a given language

@:keepgetLanguage (lang:String):EntryLanguageApi

Get an EntryLanguageApi for the given language key

@:keepgetLinkData (language:String):EntryLinkData

Get link data which can be used to link in components

@:keepgetParent ():EntryApi

Get this entry's parent

@:has_untyped@:keepgetParents ():Array<EntryApi>

Get this entry's parent

@:keepgetPath (lang:String):String

Get the entry path for a given language

@:keepgetTitle (?lang:String):String

Get the entry title for a given language, if lang is null a title of one of the existing translations is returned

@:keephasLanguage (lang:String):Bool

Check if this entry has a translation in a certain language

@:keepisChildOf (entryId:Int):Bool

Check if this entry is a child of another, supply the parent entry's ID

@:keepmoveTo (parentID:Int):EntryApi

Change the entry's parentID within its project, id 0 is project root

@:keepremove ():Void

Remove this entry and all its children

@:keepsetAllRightsRequiredToRemove (bool:Bool):EntryApi

Depreceated** Use setLocked instead.

@:keepsetLocked (bool:Bool):EntryApi

Set this entry can only be removed by admins and is forced to always have a published version

@:keepsetSetting (setting:String, value:JSONValue):EntryApi

Set one of the settings of EntrySettings for this entry

@:keepsetSettings (settings:EntrySettings):EntryApi

Set the entry's settings

@:keeptranslate (data:EntryTranslateRequest):EntryLanguageApi

Create a translation for this entry