-
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.
feat(EntityGenerator): Entity generator uses DefaultValuesResolverInt…
…erface to compute required ENUM fields length acording to their default values.
- Loading branch information
1 parent
db82ebf
commit 20263b6
Showing
26 changed files
with
513 additions
and
85 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 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
22 changes: 22 additions & 0 deletions
22
lib/EntityGenerator/src/Field/DefaultValuesResolverInterface.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,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RZ\Roadiz\EntityGenerator\Field; | ||
|
||
use RZ\Roadiz\Contracts\NodeType\NodeTypeFieldInterface; | ||
|
||
interface DefaultValuesResolverInterface | ||
{ | ||
/** | ||
* @param NodeTypeFieldInterface $field | ||
* @return array All possible default values for given field name across all node-types. | ||
*/ | ||
public function getDefaultValuesAmongAllFields(NodeTypeFieldInterface $field): array; | ||
|
||
/** | ||
* @param NodeTypeFieldInterface $field | ||
* @return int Max length of all possible default values for given field name across all node-types. | ||
*/ | ||
public function getMaxDefaultValuesLengthAmongAllFields(NodeTypeFieldInterface $field): int; | ||
} |
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 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
Oops, something went wrong.