-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from jeyroik/development
Up to installer v3
- Loading branch information
Showing
12 changed files
with
189 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
namespace extas\components\plugins\install; | ||
|
||
use extas\components\fields\Field; | ||
use extas\interfaces\IItem; | ||
use extas\interfaces\packages\IInstaller; | ||
|
||
/** | ||
* Class PluginInstallFields | ||
* | ||
* @package extas\components\plugins\install | ||
* @author jeyroik@gmail.com | ||
*/ | ||
class InstallFields extends InstallSection | ||
{ | ||
protected string $selfSection = 'fields'; | ||
protected string $selfName = 'field'; | ||
protected string $selfRepositoryClass = 'fieldRepository'; | ||
protected string $selfUID = Field::FIELD__ID; | ||
protected string $selfItemClass = Field::class; | ||
|
||
/** | ||
* @param string $sectionName | ||
* @param array $item | ||
* @param IItem|null $existed | ||
* @param IInstaller $installer | ||
*/ | ||
protected function installItem(string $sectionName, array $item, ?IItem $existed, IInstaller &$installer): void | ||
{ | ||
$uid = $item[Field::FIELD__ID] ?? '@uuid6'; | ||
$item[Field::FIELD__ID] = $uid; | ||
|
||
parent::installItem($sectionName, $item, $existed, $installer); | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
...ts/plugins/PluginInstallFieldsSamples.php → .../plugins/install/InstallFieldsSamples.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ents/plugins/PluginInstallFieldsTypes.php → ...ts/plugins/install/InstallFieldsTypes.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ugins/PluginInstallFieldsTypesSamples.php → ...ins/install/InstallFieldsTypesSamples.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
namespace extas\components\plugins\uninstall; | ||
|
||
use extas\components\fields\Field; | ||
|
||
/** | ||
* Class UninstallFields | ||
* | ||
* @package extas\components\plugins\uninstall | ||
* @author jeyroik <jeyroik@gmail.com> | ||
*/ | ||
class UninstallFields extends UninstallSection | ||
{ | ||
protected string $selfSection = 'fields'; | ||
protected string $selfName = 'field'; | ||
protected string $selfRepositoryClass = 'fieldRepository'; | ||
protected string $selfUID = Field::FIELD__ID; | ||
protected string $selfItemClass = Field::class; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/components/plugins/uninstall/UninstallFieldsSamples.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
namespace extas\components\plugins\uninstall; | ||
|
||
use extas\components\fields\FieldSample; | ||
|
||
/** | ||
* Class UninstallFieldsSamples | ||
* | ||
* @package extas\components\plugins\uninstall | ||
* @author jeyroik <jeyroik@gmail.com> | ||
*/ | ||
class UninstallFieldsSamples extends UninstallSection | ||
{ | ||
protected string $selfSection = 'fields_samples'; | ||
protected string $selfName = 'field sample'; | ||
protected string $selfRepositoryClass = 'fieldSampleRepository'; | ||
protected string $selfUID = FieldSample::FIELD__NAME; | ||
protected string $selfItemClass = FieldSample::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
namespace extas\components\plugins\uninstall; | ||
|
||
use extas\components\fields\types\FieldType; | ||
|
||
/** | ||
* Class UninstallFieldsTypes | ||
* | ||
* @package extas\components\plugins\uninstall | ||
* @author jeyroik <jeyroik@gmail.com> | ||
*/ | ||
class UninstallFieldsTypes extends UninstallSection | ||
{ | ||
protected string $selfSection = 'fields_types'; | ||
protected string $selfName = 'field type'; | ||
protected string $selfRepositoryClass = 'fieldTypeRepository'; | ||
protected string $selfUID = FieldType::FIELD__NAME; | ||
protected string $selfItemClass = FieldType::class; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/components/plugins/uninstall/UninstallFieldsTypesSamples.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
namespace extas\components\plugins\uninstall; | ||
|
||
use extas\components\fields\types\FieldTypeSample; | ||
|
||
/** | ||
* Class UninstallFieldsTypesSamples | ||
* | ||
* @package extas\components\plugins\uninstall | ||
* @author jeyroik <jeyroik@gmail.com> | ||
*/ | ||
class UninstallFieldsTypesSamples extends UninstallSection | ||
{ | ||
protected string $selfSection = 'fields_types_samples'; | ||
protected string $selfName = 'field type sample'; | ||
protected string $selfRepositoryClass = 'fieldTypeSampleRepository'; | ||
protected string $selfUID = FieldTypeSample::FIELD__NAME; | ||
protected string $selfItemClass = FieldTypeSample::class; | ||
} |
Oops, something went wrong.