public function handleStorage($fieldObject)
    {
        $type = $fieldObject->getStorageType();
        $typeName = $type->getName();
        if ($typeName === 'json') {
            /** @deprecated since 3.3 to be renamed in v4. */
            $typeName = 'json_array';
        }
        $typeCol = 'value_' . $typeName;
        $this->$typeCol = $this->getValue();
    }
public function handleStorage($fieldObject)
    {
        $type = $fieldObject->getStorageType();
        $typeName = $type->getName();
        if ($typeName === 'json') {
            /** @deprecated since 3.3 to be renamed in v4. */
            $typeName = 'json_array';
        }
        $typeCol = 'value_' . $typeName;
        $this->$typeCol = $this->getValue();
    }
public function handleStorage ( $ fieldObject ) { $ type = $ fieldObject -> getStorageType ( ) ; $ typeName = $ type -> getName ( ) ; if ( $ typeName === 'json' ) { /** @deprecated since 3.3 to be renamed in v4. */ $ typeName = 'json_array' ; } $ typeCol = 'value_' . $ typeName ; $ this -> $ typeCol = $ this -> getValue ( ) ; }
When the entity needs to be persisted the value has to be copied to a field specific to the storage type.

To do this we need a field type so we lookup the correct column to write to.

@param \Bolt\Storage\Field\Base $fieldObject
When the entity needs to be persisted the value has to be copied to a field specific to the storage type .