Entry
class Entry extends LocalizedResource implements ArrayAccess
Properties
| protected Client | $client | from BaseResource | |
| protected SystemProperties | $sys | from BaseResource | |
| protected string[] | $localeCodes | List of codes for all the locales available in the space this resource belongs to. | from LocalizedResource | 
| protected array | $fields | 
Methods
Resources in this SDK should not be built using $new Class().
Returns the environment this entry belongs to.
No description
No description
Shortcut for accessing fields using $entry->fieldName.
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
Checks whether the current entry has a field with a certain ID.
Returns a the value of a field using the given locale.
{@inheritdoc}
Details
        in BaseResource at         line 36
                    protected        
    __construct(array $data)
        
    
    Resources in this SDK should not be built using $new Class().
This method is only useful in testing environments, where the resource needs to be subclasses and this method made public.
        in BaseResource at         line 50
                            SystemProperties
    getSystemProperties()
        
    
    {@inheritdoc}
        in BaseResource at         line 58
                            
    asLink()
        
    
    {@inheritdoc}
        in BaseResource at         line 69
                            
    getId()
        
    
    {@inheritdoc}
        in BaseResource at         line 77
                            
    getType()
        
    
    {@inheritdoc}
        in LocalizedResource at         line 35
                            
    initLocales(array $locales)
        
    
    
        in LocalizedResource at         line 58
                            $this
    setLocale(Locale|string $locale)
        
    
    Set the locale for this instance.
All future calls to a getter will return the information for this locale.
        in LocalizedResource at         line 70
                            string
    getLocale()
        
    
    The locale code for the currently set locale.
        in LocalizedResource at         line 82
                    protected        string
    getLocaleFromInput(Locale|string|null $input = null)
        
    
    
        in LocalizedResource at         line 121
                    protected        string|null
    walkFallbackChain(array $valueMap, string $localeCode, Environment $environment)
        
    
    
        at         line 30
                            Space
    getSpace()
        
    
    Returns the space this entry belongs to.
        at         line 40
                            Environment
    getEnvironment()
        
    
    Returns the environment this entry belongs to.
        at         line 48
                            ContentType|null
    getContentType()
        
    
    
        at         line 59
                            mixed
    __call(string $name, array $arguments)
        
    
    
        at         line 103
                            mixed
    __get(string $name)
        
    
    Shortcut for accessing fields using $entry->fieldName.
It will use the locale currently defined.
        at         line 111
                            
    offsetGet($name)
        
    
    {@inheritdoc}
        at         line 119
                            
    offsetExists($name)
        
    
    {@inheritdoc}
        at         line 127
                            
    offsetSet($name, $value)
        
    
    {@inheritdoc}
        at         line 135
                            
    offsetUnset($name)
        
    
    {@inheritdoc}
        at         line 147
                            bool
    has(string $name)
        
    
    Checks whether the current entry has a field with a certain ID.
        at         line 171
                            mixed
    get(string $name, string|null $locale = null, bool $resolveLinks = true)
        
    
    Returns a the value of a field using the given locale.
It will also resolve links. If you want to access the ID of a link or of an array of links, simply append "Id" to the end of the $name parameter.
$author = $entry->get('author');
$id = $entry->get('authorId');
        at         line 328
                            ResourceArray
    getReferences(Query $query = null)
        
    
    Gets all entries that contain links to the current one.
You can provide a Query object in order to set parameters such as locale, include, and sorting.
        at         line 339
                            
    jsonSerialize()
        
    
    {@inheritdoc}