You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Injection of Registry classes with bind](https://github.com/OXID-eSales/examples-module/blob/b-7.4.x/src/Greeting/services.yaml#L5)
99
+
*[Using Symfony DI](services.yaml)
100
+
*[Injection of Registry classes with bind](https://github.com/OXID-eSales/examples-module/blob/b-7.4.x/services.yaml#L16)
101
+
*[Service decoration](src/Greeting/Service/Decorator/GreetingValidationDecorator.php) - shows how to decorate services
102
+
* Note: While the example uses validation/truncation for simplicity, better use cases include logging, caching, performance monitoring, or audit trails
103
+
*[Decorator registration](src/Greeting/services.yaml) - using `decorates:` in DI configuration
* model with a database (`OxidEsales\ExamplesModule\Tracker\Model\GreetingTracker`)
76
-
*``oxNew`` object factory example (`OxidEsales\ExamplesModule\Greeting\Infrastructure\UserModelFactory`)
77
-
*[DAO](src/ProductVote/Dao)
109
+
* Model with a database (`OxidEsales\ExamplesModule\Tracker\Model\TrackerModel`)
110
+
*``oxNew`` object factory example (`OxidEsales\ExamplesModule\Greeting\Infrastructure\Factory\UserModelFactory`)
111
+
*[DAO examples](src/ProductVote/Dao) - lower level abstraction for database access
112
+
* Repository examples - higher level abstraction for data access
113
+
*[GreetingRepository](src/Greeting/Infrastructure/Repository/GreetingRepository.php) - direct database query with QueryBuilder example (consider making DAO instead for cases like this)
114
+
*[UserRepository](src/Greeting/Infrastructure/Repository/UserRepository.php) - loading shop user with model example
115
+
*[TrackerRepository](src/Tracker/Infrastructure/Repository/TrackerRepository.php) - more comprehensive example showing dependencies and DTO usage
78
116
79
117
*[Various types of module settings](https://github.com/OXID-eSales/examples-module/blob/b-7.4.x/metadata.php#L38)
80
118
81
119
* Templates
82
-
*[creating templates for your module](https://github.com/OXID-eSales/examples-module/blob/b-7.4.x/views/twig/templates/greetingtemplate.html.twig)
83
-
*[extending of oxid theme templates or blocks](https://github.com/OXID-eSales/examples-module/tree/b-7.4.x/views/twig/extensions/themes)
120
+
*[creating templates for your module](views/twig/templates/greetingtemplate.html.twig)
121
+
*[extending of oxid theme templates or blocks](views/twig/extensions/themes)
84
122
* extending a shop admin template block (`admin_user_main_form` - only an extension of a block, without functionality)
85
123
* extending a shop template block (`start_newest_articles`)
86
124
87
125
* Using the translations for your module specific phrases
*[Subscribing to shop events](https://github.com/OXID-eSales/examples-module/blob/b-7.4.x/src/Tracker/Subscriber/BeforeModelUpdate.php)
130
+
*[Subscribing to shop events](src/Tracker/Subscriber/BeforeModelUpdate.php) - listening to `BeforeModelUpdateEvent`
131
+
*[Creating and dispatching custom module events](src/ProductVote/Event/ProductVotedEvent.php)
132
+
*[Dispatching the event](src/ProductVote/Service/VoteService.php) - triggering events from services
93
133
94
134
* Testing your module backend and frontend part
95
135
*[Composer aliases for easy running of tests and quality tools](https://github.com/OXID-eSales/examples-module/blob/b-7.4.x/composer.json#L48)
96
-
*[Using the github actions as CI tool with all recommended tools preconfigured for you.](https://github.com/OXID-eSales/examples-module/tree/b-7.4.x/.github)
136
+
*[Using the github actions as CI tool with all recommended tools preconfigured for you.](.github)
97
137
98
-
*[Using variables from .env file](https://github.com/OXID-eSales/examples-module/tree/b-7.4.x/.env)
99
-
*[Access via `getenv()` function](https://github.com/OXID-eSales/examples-module/tree/b-7.4.x/src/Extension/Controller/StartController.php)
138
+
*[Using variables from .env file](.env)
139
+
*[Access via `getenv()` function](src/Extension/Controller/StartController.php)
100
140
* Note: Changes to environment variables take effect immediately — no cache clearing is required.
101
-
*[Access via DI container](https://github.com/OXID-eSales/examples-module/tree/b-7.4.x/src/Greeting/services.yaml)
141
+
*[Access via DI container](src/Greeting/services.yaml)
102
142
* Note: After updating environment variables, you must clear the cache for changes to take effect.
0 commit comments