Statamic entry value cheat sheet
This is just a note!
I mostly leave these here for my own reference, but if you find this useful that's great. 🙂
Accessors
Method | Returns |
---|---|
$entry->title $entry['title'] |
single evaluated value |
$entry->value('title') |
single raw value from origin |
$entry->augmentedValue('title') |
single augmented value |
$entry->get('title') |
single raw value |
$entry->toArray() $entry->toEvaluatedAugmentedArray() |
array of evaluated values |
$entry->values() |
collection of raw values from origin |
$entry->toAugmentedArray() |
array of augmented values |
$entry->toAugmentedCollection() |
collection of augmented values |
$entry->toShallowAugmentedArray() |
shallow array of augmented values |
$entry->toShallowAugmentedCollection() |
shallow collection of augmented values |
$entry->data() |
collection of raw values |
Types
- raw value: The plain source value that is stored in the entry data.
-
augmented value: A
Value
object that holds the raw value and can return an evaluated value. - evaluated value: The parsed final value that is output in a template.