forked from cleverage/processuibundle
-
Notifications
You must be signed in to change notification settings - Fork 0
13 lauch process without context or input #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tonongregory
merged 17 commits into
prepare-release
from
13_lauch_process_without_context_or_input
Dec 17, 2024
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e8a4c26
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon 85f3145
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon c9df400
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon 1ee039b
#14 Quality. Phpstan remove - '#type has no value type specif…
clever-age-gtonon ccce788
#14 Quality. Phpstan remove missingType.generics
clever-age-gtonon 1173eee
#14 Quality. Phpstan 7
clever-age-gtonon fecf2a2
#14 Quality. Phpstan 8
clever-age-gtonon 85cf872
#14 Quality. PhpCs
clever-age-gtonon e996d47
#14 Quality. Phpstan use phpstan type to prevent duplicate definitions.
clever-age-gtonon 1911fbf
#14 Quality. Phpstan use phpstan type to prevent duplicate definitions.
clever-age-gtonon b1433dc
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon 65b2003
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon 5507185
Merge branch 'prepare-release' into 13_lauch_process_without_context_…
tonongregory ad6d10a
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon dd2e099
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon b103677
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon 05c1878
#13 ability to add modal confirmation or nothing instead of launch fr…
clever-age-gtonon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,20 @@ | ||
| <?php | ||
|
|
||
| /* | ||
| * This file is part of the CleverAge/UiProcessBundle package. | ||
| * | ||
| * Copyright (c) Clever-Age | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| namespace CleverAge\UiProcessBundle\Twig\Components; | ||
|
|
||
| class BootstrapModal | ||
| { | ||
| public ?string $id = null; | ||
| public ?string $title = null; | ||
| public ?string $message = null; | ||
| public ?string $confirmUrl = null; | ||
| } |
This file contains hidden or 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,31 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /* | ||
| * This file is part of the CleverAge/UiProcessBundle package. | ||
| * | ||
| * Copyright (c) Clever-Age | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| namespace CleverAge\UiProcessBundle\Twig\Extension; | ||
|
|
||
| use CleverAge\UiProcessBundle\Twig\Runtime\ProcessExtensionRuntime; | ||
| use Twig\Extension\AbstractExtension; | ||
| use Twig\TwigFunction; | ||
|
|
||
| class ProcessExtension extends AbstractExtension | ||
| { | ||
| public function getFunctions(): array | ||
| { | ||
| return [ | ||
| new TwigFunction( | ||
| 'resolve_ui_options', | ||
| [ProcessExtensionRuntime::class, 'getUiOptions'] | ||
| ), | ||
| ]; | ||
| } | ||
| } |
This file contains hidden or 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,33 @@ | ||
| <?php | ||
|
|
||
| /* | ||
| * This file is part of the CleverAge/UiProcessBundle package. | ||
| * | ||
| * Copyright (c) Clever-Age | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| namespace CleverAge\UiProcessBundle\Twig\Runtime; | ||
|
|
||
| use CleverAge\UiProcessBundle\Manager\ProcessConfigurationsManager; | ||
| use Twig\Extension\RuntimeExtensionInterface; | ||
|
|
||
| /** | ||
| * @phpstan-import-type UiOptions from ProcessConfigurationsManager | ||
| */ | ||
| class ProcessExtensionRuntime implements RuntimeExtensionInterface | ||
| { | ||
| public function __construct(protected ProcessConfigurationsManager $processConfigurationsManager) | ||
| { | ||
| } | ||
|
|
||
| /** | ||
| * @return UiOptions|array{} | ||
| */ | ||
| public function getUiOptions(string $code): array | ||
| { | ||
| return $this->processConfigurationsManager->getUiOptions($code) ?? []; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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,37 @@ | ||
| <div {{ attributes.defaults({ | ||
| class: 'modal fade', | ||
| tabindex: '-1', | ||
| 'aria-hidden': 'true', | ||
| id: id ? id : false, | ||
| }) }} | ||
| data-controller="bootstrap-modal" | ||
| > | ||
| <div class="modal-dialog"> | ||
| <div class="modal-content"> | ||
| {% block modal_full_content %} | ||
| {% if block('modal_header') %} | ||
| <div class="modal-header text-center"> | ||
| {% block modal_header %} | ||
| <h5>{{ title }}</h5> | ||
| {% endblock %} | ||
| <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
| </div> | ||
| {% endif %} | ||
|
|
||
| <div class="modal-body"> | ||
| {% block modal_body %}{{ message }}{% endblock %} | ||
| </div> | ||
|
|
||
| {% if block('modal_footer') %} | ||
| <div class="modal-footer"> | ||
| {% block modal_footer %} | ||
| {% if null != confirmUrl %} | ||
| <a href="{{ confirmUrl }}"><button type="button" class="btn btn-primary">{{ 'Confirm'|trans }}</button></a> | ||
| {% endif %} | ||
| {% endblock %} | ||
| </div> | ||
| {% endif %} | ||
| {% endblock %} | ||
| </div> | ||
| </div> | ||
| </div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clever-age-gtonon il faudrait mettre les valeurs par défaut sur chaque option.