This class represents a location in the repository.
Constants¶
                
SORT_FIELD_CLASS_IDENTIFIER        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_CLASS_NAME        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_CONTENTOBJECT_ID        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_DEPTH        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
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_NAME        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_NODE_ID        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_PATH        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_PRIORITY        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_PUBLISHED        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_FIELD_SECTION        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_ORDER_ASC        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_ORDER_DESC        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_ORDER_MAP        ¶
    
        Map for Location sort order to their respective Query SORT constants.
| 
                     | 
                
                    
                     | 
            
                
STATUS_DRAFT        ¶
    
        | 
                     | 
                
                    
                     | 
            
                
STATUS_PUBLISHED        ¶
    
        | 
                     | 
                
                    
                     | 
            
Properties¶
                
        $contentId
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Accessing magic getter is deprecated since 4.6.7 and will be removed in 5.0.0. Use Location::getContentId() instead.
                
        $contentInfo
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $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
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $depth
            ¶
    
        Depth location has in the location tree.
| 
                     | 
                
                    
                     | 
            
                
        $explicitlyHidden
            ¶
    
        Indicates that the Location entity has been explicitly marked as hidden.
| 
                     | 
                
                    
                     | 
            
                
        $hidden
            ¶
    
        Indicates that the Location entity is hidden (explicitly or hidden by content).
| 
                     | 
                
                    
                     | 
            
                
        $id
            ¶
    
        | 
                     | 
                
                    
                     | 
            
                
        $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
            ¶
    
        Parent ID.
| 
                     | 
                
                    
                     | 
            
                
        $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
            ¶
    
        The materialized path of the location entry, eg: /1/2/4/23/.
| 
                     | 
                
                    
                     | 
            
                
        $priority
            ¶
    
        Location priority.
| 
                     | 
                
                    
                     | 
            
Position of the Location among its siblings when sorted using priority sort order.
                
        $remoteId
            ¶
    
        Remote ID.
| 
                     | 
                
                    
                     | 
            
A universally unique identifier.
                
        $sortField
            ¶
    
        Specifies which property the child locations should be sorted on.
| 
                     | 
                
                    
                     | 
            
                
        $sortOrder
            ¶
    
        Specifies whether the sort order should be ascending or descending.
| 
                     | 
                
                    
                     | 
            
Methods¶
                
__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()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $property | mixed | - | - | 
Tags
                
__isset()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $property | mixed | - | - | 
Tags
                
getContent()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
                
getContentId()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int
                
getContentInfo()
            ¶
    
        Returns the content info of the content object of this location.
| 
                     | 
                
                    
                     | 
            
Return values
                
getDepth()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int
                
getId()
            ¶
    
        | 
                     | 
                
                    
                     | 
            
Return values
int
                
getParentLocation()
            ¶
    
        Return the parent location of this location.
| 
                     | 
                
                    
                     | 
            
Return values
Location|null
                
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()
            ¶
    
        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()
            ¶
    
        Get SortClause objects built from Locations' sort options.
| 
                     | 
                
                    
                     | 
            
Return values
array<string|int, SortClause>
Tags
                
isDraft()
            ¶
    
        Returns true if current location is a draft.
| 
                     | 
                
                    
                     | 
            
Return values
bool
                
isHidden()
            ¶
    
        Indicates that the Location is hidden either explicitly or by content.
| 
                     | 
                
                    
                     | 
            
Return values
bool
                
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()
            ¶
    
        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]