Download the PHP package tombroucke/acf-objects without Composer
On this page you can find all versions of the php package tombroucke/acf-objects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tombroucke/acf-objects
More information about tombroucke/acf-objects
Files in tombroucke/acf-objects
Package acf-objects
Short Description Convert return values from get_field() to objects with easy-to-use methods
License MIT
Informations about the package acf-objects
ACF Objects
This package converts the return values of ACF to objects with easy-to-use methods.
Instead of calling get_field('selector')
, you can use the AcfObjects facade: AcfObjects::getField('selector')
Installation
composer require tombroucke/acf-objects
You might have to clear wp acorn cache: wp acorn optimize:clear
Usage
Checkbox
When getting the value for a Checkbox field, an Illuminate/Support/Collection
will be returned.
ColorPicker
DatePicker
When getting the value for a DatePicker field, a Carbon
instance will be returned. If the field has no value, a FallbackField
will be returned.
DateTimePicker
When getting the value for a DateTimePicker field, a Carbon
instance will be returned. If the field has no value, a FallbackField
will be returned.
File
Gallery
When getting the value for a Group field, an Illuminate/Support/Collection
will be returned.
Google Maps
Group
Image
Link
Number
Repeater
When getting the value for a Repeater field, an Illuminate/Support/Collection
will be returned.
Text
TextArea
Upgrading to v4.x from v3.x
Use new facade
Use new facade and remove deprecated get_field method
Use new facade
Array access for repeaters instead of the get()
method.
All versions of acf-objects with dependencies
nesbot/carbon Version *
illuminate/support Version *
spatie/ray Version ^1.41