Skip to content

JsonData ​

Type
Class
Namespace
craft\fields\data
Inherits
craft\fields\data\JsonData » yii\base\BaseObject
Implements
ArrayAccess, IteratorAggregate, craft\base\Serializable, yii\base\Configurable
Since
5.7.0

JSON field data class.

View source

Public Properties ​

PropertyDescription
iterator
json
type
value

iterator ​

Default value
null
Access
Read-only

View source

json ​

Default value
null
Access
Read-only

View source

type ​

Default value
null
Access
Read-only

View source

value ​

Default value
null
Access
Read-only

View source

Public Methods ​

MethodDescription
__call()Calls the named method which is not a class method.
__construct()
__get()Returns the value of an object property.
__isset()Checks if a property is set, i.e. defined and not null.
__set()Sets value of an object property.
__toString()
__unset()Sets an object property to null.
canGetProperty()Returns a value indicating whether a property can be read.
canSetProperty()Returns a value indicating whether a property can be set.
className()Returns the fully qualified name of this class.
getIterator()
getJson()
getType()
getValue()
hasMethod()Returns a value indicating whether a method is defined.
hasProperty()Returns a value indicating whether a property is defined.
init()Initializes the object.
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
serialize()

__construct() ​

View source

Arguments ​

  • $value
  • $config

__toString() ​

View source

getIterator() ​

View source

getJson() ​

View source

Arguments ​

  • $pretty
  • $indent

getType() ​

View source

getValue() ​

View source

offsetExists() ​

View source

Arguments ​

  • $offset

offsetGet() ​

View source

Arguments ​

  • $offset

offsetSet() ​

View source

Arguments ​

  • $offset
  • $value

offsetUnset() ​

View source

Arguments ​

  • $offset

serialize() ​

View source