Devise\Pages\Fields\Handlers\AudioFieldUpdated::noAudioPathDefined PHP Method

noAudioPathDefined() protected method

Handle the case where the user removes the video or just doesn't specify a url path to a video
protected noAudioPathDefined ( Field $field, array $input ) : boolean
$field Field
$input array
return boolean
    protected function noAudioPathDefined($field, $input)
    {
        $filepath = trim($field->values->original);
        if (!empty($filepath)) {
            return false;
        }
        foreach ($this->formats as $format) {
            $field->values->merge(["{$format}_url" => '']);
        }
        $field->json_value = $field->values->toJSON();
        $field->save();
        return true;
    }