public function updatePlugin(Plugin
$plugin) { $bootstrap =
$this->
getPluginBootstrap($plugin);
/** @var Shopware_Components_Plugin_Namespace $namespace */
$namespace =
$bootstrap->
Collection();
try { $result =
$namespace->
updatePlugin($bootstrap);
} catch (Exception
$e) { throw new Exception(sprintf("Unable to update '%s', got exception:\n'%s'\n",
$plugin->
getName(),
$e->
getMessage()), 0,
$e);
} $result = \
is_bool($result) ?
['success' =>
$result] :
$result;
if (!
$result['success'
]) { if (isset($result['message'
])) { throw new Exception(sprintf("Unable to update '%s', got message:\n%s\n",
$plugin->
getName(),
$result['message'
]));
} throw new Exception(sprintf('Unable to update "%s", an unknown error occured.',
$plugin->
getName()));
}