public function changeConnectionMode($value)
{
$current_mode = $this->serialize()['connection_mode'];
if ($value == $current_mode) {
$reply = "The connection mode is already set to {$value}.";
return $reply;
}
switch ($value) {
case 'git':
$workflow_name = 'enable_git_mode';
break;
case 'sftp':
$workflow_name = 'enable_on_server_development';
break;
}
$workflow = $this->getWorkflows()->create($workflow_name);
return $workflow;
}