Prepare Beta Version
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\VuexyAdmin\Application\Modules;
|
||||
|
||||
class ModulePackageRegistrarService
|
||||
{
|
||||
public function registerFromMetadata(ModuleMetadataDTO $metadata, array $extra = []): ModulePackage
|
||||
{
|
||||
return ModulePackage::updateOrCreate([
|
||||
'name' => $metadata->name,
|
||||
], array_merge([
|
||||
'display_name' => $metadata->displayName,
|
||||
'description' => $metadata->description,
|
||||
'keywords' => $metadata->keywords,
|
||||
'author_name' => $metadata->authorName,
|
||||
'author_email' => $metadata->authorEmail,
|
||||
'composer' => $metadata->toArray(),
|
||||
'repository_type'=> 'public',
|
||||
'active' => true,
|
||||
], $extra));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user