protected function getThemeId(PluginEntity $plugin, $class)
{
$id = $this->option('id');
if (!$id) {
$id = $plugin->getId() . '@' . strtolower($class);
} else {
if (strpos('theme/', $id) === 0) {
$id = substr($id, 6);
}
if (strpos($id, '@') === false) {
$id = $plugin->getId() . '@' . $id;
}
}
$theme = \App::make('xe.theme')->getTheme('theme/' . $id);
if ($theme !== null) {
throw new \Exception("Theme[{$theme}] already exists.");
}
return $id;
}