This class represents a location in the repository.
Constants¶
                 SORT_FIELD_CLASS_IDENTIFIER        ¶
SORT_FIELD_CLASS_IDENTIFIER        ¶
    
        |  |  | 
                 SORT_FIELD_CLASS_NAME        ¶
SORT_FIELD_CLASS_NAME        ¶
    
        |  |  | 
                 SORT_FIELD_CONTENTOBJECT_ID        ¶
SORT_FIELD_CONTENTOBJECT_ID        ¶
    
        |  |  | 
                 SORT_FIELD_DEPTH        ¶
SORT_FIELD_DEPTH        ¶
    
        |  |  | 
                 SORT_FIELD_MAP        ¶
SORT_FIELD_MAP        ¶
    
        Map for Location sort fields to their respective SortClauses.
|  |  | 
Those not here (class name/identifier and modified subnode) are missing/deprecated and will most likely be removed in the future.
                 SORT_FIELD_MODIFIED        ¶
SORT_FIELD_MODIFIED        ¶
    
        |  |  | 
                 SORT_FIELD_NAME        ¶
SORT_FIELD_NAME        ¶
    
        |  |  | 
                 SORT_FIELD_NODE_ID        ¶
SORT_FIELD_NODE_ID        ¶
    
        |  |  | 
                 SORT_FIELD_PATH        ¶
SORT_FIELD_PATH        ¶
    
        |  |  | 
                 SORT_FIELD_PRIORITY        ¶
SORT_FIELD_PRIORITY        ¶
    
        |  |  | 
                 SORT_FIELD_PUBLISHED        ¶
SORT_FIELD_PUBLISHED        ¶
    
        |  |  | 
                 SORT_FIELD_SECTION        ¶
SORT_FIELD_SECTION        ¶
    
        |  |  | 
                 SORT_ORDER_ASC        ¶
SORT_ORDER_ASC        ¶
    
        |  |  | 
                 SORT_ORDER_DESC        ¶
SORT_ORDER_DESC        ¶
    
        |  |  | 
                 SORT_ORDER_MAP        ¶
SORT_ORDER_MAP        ¶
    
        Map for Location sort order to their respective Query SORT constants.
|  |  | 
                 STATUS_DRAFT        ¶
STATUS_DRAFT        ¶
    
        |  |  | 
                 STATUS_PUBLISHED        ¶
STATUS_PUBLISHED        ¶
    
        |  |  | 
Properties¶
                 $contentId
            ¶
        $contentId
            ¶
    
        |  |  | 
Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use Location::getContentId() instead.
                 $contentInfo
            ¶
        $contentInfo
            ¶
    
        |  |  | 
                 $status
            ¶
        $status
            ¶
    
        The status of the location.
|  |  | 
A location gets the status Location::STATUS_DRAFT on newly created content which is not published. When content is published the location gets the status Location::STATUS_PUBLISHED.
                 $content
            ¶
        $content
            ¶
    
        |  |  | 
                 $depth
            ¶
        $depth
            ¶
    
        Depth location has in the location tree.
|  |  | 
                 $explicitlyHidden
            ¶
        $explicitlyHidden
            ¶
    
        Indicates that the Location entity has been explicitly marked as hidden.
|  |  | 
                 $hidden
            ¶
        $hidden
            ¶
    
        Indicates that the Location entity is hidden (explicitly or hidden by content).
|  |  | 
                 $id
            ¶
        $id
            ¶
    
        |  |  | 
                 $invisible
            ¶
        $invisible
            ¶
    
        Indicates that the Location is not visible, being either marked as hidden itself, or implicitly hidden by its Content or an ancestor Location.
|  |  | 
                 $parentLocationId
            ¶
        $parentLocationId
            ¶
    
        Parent ID.
|  |  | 
                 $path
            ¶
        $path
            ¶
    
        The list of ancestor locations' IDs, ordered by increasing depth, starting with '1', and ending with the current Location's ID.
|  |  | 
Same as Location::$pathString but as array, e.g.: ['1', '2', '4', '23'].
                 $pathString
            ¶
        $pathString
            ¶
    
        The materialized path of the location entry, eg: /1/2/4/23/.
|  |  | 
                 $priority
            ¶
        $priority
            ¶
    
        Location priority.
|  |  | 
Position of the Location among its siblings when sorted using priority sort order.
                 $remoteId
            ¶
        $remoteId
            ¶
    
        Remote ID.
|  |  | 
A universally unique identifier.
                 $sortField
            ¶
        $sortField
            ¶
    
        Specifies which property the child locations should be sorted on.
|  |  | 
                 $sortOrder
            ¶
        $sortOrder
            ¶
    
        Specifies whether the sort order should be ascending or descending.
|  |  | 
Methods¶
                 __construct()
            ¶
__construct()
            ¶
    
        Construct object optionally with a set of properties.
|  |  | 
Readonly properties values must be set using $properties as they aren't writable anymore
after object has been created.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $properties | array<string, mixed> | [] | - | 
                 __get()
            ¶
__get()
            ¶
    
        |  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $property | mixed | - | - | 
Tags
                 __isset()
            ¶
__isset()
            ¶
    
        |  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $property | mixed | - | - | 
Tags
                 getContent()
            ¶
getContent()
            ¶
    
        |  |  | 
Return values
                 getContentId()
            ¶
getContentId()
            ¶
    
        |  |  | 
Return values
int
                 getContentInfo()
            ¶
getContentInfo()
            ¶
    
        Returns the content info of the content object of this location.
|  |  | 
Return values
                 getDepth()
            ¶
getDepth()
            ¶
    
        |  |  | 
Return values
int
                 getId()
            ¶
getId()
            ¶
    
        |  |  | 
Return values
int
                 getParentLocation()
            ¶
getParentLocation()
            ¶
    
        Return the parent location of this location.
|  |  | 
Return values
Location|null
                 getPath()
            ¶
getPath()
            ¶
    
        The list of ancestor locations' IDs, ordered by increasing depth, starting with 1, and ending with the current Location's ID.
|  |  | 
Same as Location::getPathString() but as array, e.g.: ['1', '2', '4', '23'].
Return values
array<string|int, mixed>
                 getPathString()
            ¶
getPathString()
            ¶
    
        The path to the Location represented by the current instance, e.g. /1/2/4/23/ where 23 is current ID.
|  |  | 
Return values
string
                 getSortClauses()
            ¶
getSortClauses()
            ¶
    
        Get SortClause objects built from Locations' sort options.
|  |  | 
Return values
array<string|int, SortClause>
Tags
                 isDraft()
            ¶
isDraft()
            ¶
    
        Returns true if current location is a draft.
|  |  | 
Return values
bool
                 isHidden()
            ¶
isHidden()
            ¶
    
        Indicates that the Location is hidden either explicitly or by content.
|  |  | 
Return values
bool
                 isInvisible()
            ¶
isInvisible()
            ¶
    
        Indicates that the Location is not visible, being either marked as hidden itself, or implicitly hidden by its Content or an ancestor Location.
|  |  | 
Return values
bool
                 getProperties()
            ¶
getProperties()
            ¶
    
        Returns list of available properties' names.
|  |  | 
Override to add dynamic properties.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $dynamicProperties | array<int, string> | [] | Additional dynamic properties exposed on the object | 
Return values
array<int, string>
Attributes
- #[Ignore]