public function refresh($entity)
    {
        $fields = $this->getFields();

        foreach ($fields as $key => $mapping) {
            $fieldType = $this->fieldManager->get($mapping['fieldtype'], $mapping);
            $getter = 'get' . ucfirst($key);
            $value = $entity->$getter();
            if ($value) {
                $fieldType->set($entity, $value);
            }
        }
    }
public function refresh($entity)
    {
        $fields = $this->getFields();

        foreach ($fields as $key => $mapping) {
            $fieldType = $this->fieldManager->get($mapping['fieldtype'], $mapping);
            $getter = 'get' . ucfirst($key);
            $value = $entity->$getter();
            if ($value) {
                $fieldType->set($entity, $value);
            }
        }
    }
public function refresh ( $ entity ) { $ fields = $ this -> getFields ( ) ; foreach ( $ fields as $ key => $ mapping ) { $ fieldType = $ this -> fieldManager -> get ( $ mapping [ 'fieldtype' ] , $ mapping ) ; $ getter = 'get' . ucfirst ( $ key ) ; $ value = $ entity -> $ getter ( ) ; if ( $ value ) { $ fieldType -> set ( $ entity , $ value ) ; } } }
Refresh an entities values.

@param object|null $entity

@throws \Bolt\Exception\StorageException
Refresh an entities values .