-
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.
- Initial commit
- Loading branch information
Showing
26 changed files
with
887 additions
and
166 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ indent_size = 4 | |
|
||
[composer.json] | ||
indent_style = space | ||
indent_size = 2 | ||
indent_size = 2 |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: PHP Style | ||
|
||
on: [ push ] | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
php-cs-fixer: | ||
runs-on: self-hosted | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: PHP-CS-Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0 | ||
with: | ||
args: --config=.php_cs.dist --allow-risky yes | ||
- name: PHP-CS-Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0 | ||
with: | ||
args: --config=.php_cs.dist --allow-risky yes | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply php-cs-fixer changes | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply php-cs-fixer changes |
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,23 @@ | ||
name: Notify on pullrequest action | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, closed] | ||
pull_request_review: | ||
types: [submitted, edited, dismissed] | ||
issue_comment: | ||
types: [created, deleted] | ||
|
||
jobs: | ||
success: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Microsoft Teams Notification | ||
uses: skitionek/notify-microsoft-teams@master | ||
if: always() | ||
with: | ||
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | ||
needs: ${{ toJson(needs) }} | ||
job: ${{ toJson(job) }} | ||
steps: ${{ toJson(steps) }} |
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 |
---|---|---|
|
@@ -7,4 +7,3 @@ Thumbs.db | |
# PHP-CS-Fixer | ||
/.php_cs | ||
/.php_cs.cache | ||
|
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 |
---|---|---|
@@ -1,11 +1,6 @@ | ||
# Changelog | ||
|
||
All notable changes to this Bundle will be documented in this file. | ||
All notable changes to the Workflow Extend Bundle will be documented in this file. | ||
|
||
| **Bundle Version** | **Pimcore Version** | | ||
|--------------------|---------------------| | ||
| 1.x.x | Pimcore 10 | | ||
|
||
## [1.0.0] - 2023-02-10 | ||
|
||
- initial commit | ||
## [1.0.0] - 2023-01-13 | ||
- initial release |
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 |
---|---|---|
@@ -1,18 +1,114 @@ | ||
# Template Pimcore Bundle | ||
# Studio1® Pimcore Workflow Extend Bundle | ||
|
||
## Post Fork Instructions | ||
This bundle extends the Pimcore Workflow Feature. It adds the possibility to change data during the workflow transition. | ||
|
||
### Search and replace | ||
> **Warning:** This bundle is completely untested with the Pimcore communitiy edition and will probably not work. | ||
> Further work is needed to make it work with the community edition. | ||
- [ ] search and replace `template_pimcore` within your bundle source code | ||
- [ ] search and replace `TemplatePimcore` within your bundle source code | ||
- [ ] search and replace `Template Pimcore` within your bundle source code | ||
- [ ] add correct namespace to the files 'src/TemplatePimcoreBundle.php' and ' | ||
src/DependencyInjection/TemplatePimcoreExtension.php' | ||
- [ ] add correct translations to the files in 'src/Resources/translations' | ||
## Dependencies | ||
|
||
### Rename files | ||
Will be automatically installed with composer: | ||
|
||
- [ ] rename the file 'src/TemplatePimcoreBundle.php' to 'src/YourBundleName.php' | ||
- [ ] rename the file 'src/DependencyInjection/TemplatePimcoreExtension.php' to ' | ||
src/DependencyInjection/YourBundleNameExtension.php' | ||
- [Pimcore Enterprise Asset Metadata Bundle](https://pimcore.com/docs/asset-metadata/current/) | ||
- [Pimcore Workflow Designer](https://pimcore.com/docs/workflow-designer/current/) | ||
- [Composer Patches](https://github.com/cweagans/composer-patches) | ||
|
||
## Installation | ||
|
||
### Preparation | ||
|
||
Before you require the bundle via composer, you need to add the following to your composer.json: | ||
|
||
```json | ||
"extra": { | ||
"enable-patching": true | ||
} | ||
``` | ||
|
||
This will enable the composer patches plugin, for external dependencies. | ||
|
||
### Composer | ||
|
||
```bash | ||
composer require studio1/workflow-extend:[version] | ||
``` | ||
|
||
During the installation process, the composer patches plugin will automatically apply the | ||
needed patches to the pimcore core files. | ||
|
||
Please check if the patches were applied correctly. If not, you need to remove the vendor folder and run `composer install` again. | ||
|
||
### Enable Bundle | ||
|
||
Enable the bundle as with any other Pimcore bundle. | ||
|
||
```bash | ||
bin/console pimcore:bundle:enable WorkflowExtendBundle | ||
``` | ||
|
||
### Uninstall | ||
|
||
```bash | ||
composer remove studio1/workflow-extend | ||
``` | ||
> Please note that the composer patches plugin will not remove the patches automatically. You need to remove them manually. | ||
## Usage / Configuration | ||
|
||
> **Warning:** The bundle currently supports data objects and assets only (no documents etc.). | ||
| Configuration | Explanation | | ||
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| class | MAM- or PIM Class | | ||
| attribute | Attribute that will be changed during the transition | | ||
| value | Value that will be set on the given object/attribute | | ||
| languages | Languages for which the value should be set. Comma separated e.g. (de,de_DE,en,en_US). Not needed, if localized fields are not available or `languagesSetAll` is set. | | ||
| languagesSetAll | The value will be applied for all available languages | | ||
|
||
For Pimcore Enterprise Projects, you can configure the workflow transitions in the backend: | ||
|
||
![Backend Configuration](docs/backend_configuration.png) | ||
|
||
In Pimcore Community Edition, you need to populate the `data` option (implemnted by this bundle) in your workflow | ||
configuration: | ||
|
||
```yaml | ||
transitions: | ||
example-transition: | ||
options: | ||
label: 'Example transition' | ||
# ... | ||
# data that will be changed during the transition | ||
data: | ||
class: Basic | ||
attribute: Title | ||
value: test | ||
languages: 'de,de_DE' | ||
languagesSetAll: true | ||
``` | ||
|
||
## Logs | ||
|
||
Can be found in `var/log/workflow-extend-bundle.log`. | ||
|
||
## Main components | ||
|
||
- [transitionSettings.js](src/Resources/public/js/pimcore/configuration/item/transitionSettings.js) | ||
- Extends the Pimcore Workflow Designer by additional fields for the transition settings popup | ||
- [SetAttributeSubscriber.php](src/EventSubscriber/SetAttributeSubscriber.php) | ||
- Listens to the `workflow.transition` event and changes the data | ||
- [addDiConfiguration.patch](patches/addDiConfiguration.patch) | ||
- Adds the `data` option to the workflow configuration | ||
- A patch file is needed, since there is no other way to extend the dependency injection configuration of the | ||
workflow bundle | ||
|
||
## Todos | ||
|
||
- Adapt the bundle to work with the Pimcore community edition | ||
- Remove dependency to enterprise bundles | ||
- Check existence of enterprise bundles at runtime | ||
- Support for documents | ||
|
||
--- | ||
|
||
Last Modified: 2023-01-13 |
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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,27 @@ | ||
Index: bundles/CoreBundle/DependencyInjection/Configuration.php | ||
IDEA additional info: | ||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | ||
<+>UTF-8 | ||
=================================================================== | ||
diff --git a/bundles/CoreBundle/DependencyInjection/Configuration.php b/bundles/CoreBundle/DependencyInjection/Configuration.php | ||
--- a/bundles/CoreBundle/DependencyInjection/Configuration.php | ||
+++ b/bundles/CoreBundle/DependencyInjection/Configuration.php (date 1673604646885) | ||
@@ -1835,6 +1835,18 @@ | ||
->arrayNode('options') | ||
->children() | ||
->scalarNode('label')->info('Nice name for the Pimcore backend.')->end() | ||
+ // Studio1 start | ||
+ ->arrayNode('data') | ||
+ ->children() | ||
+ ->scalarNode('type')->info('')->defaultValue('')->end() | ||
+ ->scalarNode('class')->info('')->defaultValue('')->end() | ||
+ ->scalarNode('attribute')->info('')->defaultValue('')->end() | ||
+ ->scalarNode('languages')->info('')->defaultValue('')->end() | ||
+ ->scalarNode('languagesSetAll')->info('')->defaultValue(false)->end() | ||
+ ->scalarNode('value')->info('')->defaultValue('')->end() | ||
+ ->end() | ||
+ ->end() | ||
+ // Studio1 end | ||
->arrayNode('notes') | ||
->children() | ||
->booleanNode('commentEnabled')->defaultFalse()->info('If enabled a detail window will open when the user executes the transition. In this detail view the user be asked to enter a "comment". This comment then will be used as comment for the notes/events feature.')->end() |
Empty file.
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.