On this page
Fluent: Basics
Last updated on
18 August 2022
This documentation needs work. See "Help improve this page" in the sidebar.
Methods
value()
Return the first value in the field
Arguments:
- path: field name for field with sub values you can use dot notation
- defaultValue: if field is empty or not exist return this value
- fail: true if you want to get an exception if field not exist
<?php
using($node)->value('field_name', $defaultValue, $fail);values()
Retrieve all values in the field
<?php
using($node)->values('field_name', $fail);
<?php
using($node)->values([
'formater' => 'body.formater',
'text' => 'body.value',
'title'
], $fail);nthValue()
Return specific item position in the field
<?php
using($node)->nthValue('field_name', 2, $fail);Help improve this page
Page status: Needs work
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion