plugin / owc-mijn-services
Retrieve information from ZGW to show in Mijn Services
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 4
Type:wordpress-plugin
pkg:composer/plugin/owc-mijn-services
Requires
- php: ^8.1
- eftec/bladeone: ^4.19
- owc/idp-userdata: ^1.1
- owc/zgw-api: dev-dev
- php-di/php-di: ^7.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-12-04 16:11:22 UTC
README
OWC Mijn Services is a WordPress plugin built around custom Gutenberg blocks that integrate with ZGW (Zaakgericht Werken) APIs. These blocks are the foundation of the plugin, allowing you to easily configure, and display data—directly within the WordPress block editor.
Installation
Manual installation
- Upload the 'owc-mijn-services' folder in to the
/wp-content/plugins/directory. cd /wp-content/plugins/owc-mijn-services- Run composer install, NPM asset build is in version control already.
- Activate the plugin in via the WordPress admin.
Composer installation
composer source git@github.com:OpenWebconcept/plugin-owc-mijn-services.gitcomposer require plugin/owc-mijn-servicescd /wp-content/plugins/owc-mijn-services- Run
composer install, NPM asset build is in version control already.
Configure your project
To use this plugin, make sure the following pages exist in your WordPress installation:
- A single page for a Zaak that contains the owc-my-services/zaak block.
- A single page for a Zaak download, no blocks required.
- A page (any type) that contains the owc-my-services/mijn-zaken block.
Gutenberg blocks
owc-my-services/zaak
This block displays all data for a single Zaak. Selecting a ZGW API supplier is the only configuration required in the block settings.
owc-my-services/mijn-zaken
This block displays an overview of all Zaken, filtered by the selected supplier and the social security number (BSN) of the currently logged-in citizen.
NLDS Components
Both owc-my-services/zaak and owc-my-services/mijn-zaken blocks use components from the NLDS (Nederlandse Design System).
- The NLDS React components and CSS are automatically loaded when a block is placed on the page.
- The project should have NLDS design tokens available to ensure styling.
Logging
Enable logging to keep track of errors during communication with the ZGW supplier(s).
- Logs are written daily to
owc-my-services-log{-date}.jsonin the WordPress webroot directory. - A rotating file handler keeps up to 7 log files by default, deleting the oldest as needed.
- You can change the maximum number of log files using the filter described below.
Hooks
Customizing Template Paths
You can customize the template paths by using the following filter in your theme or another plugin:
add_filter('owcms::view/template-paths', function ($paths) { $paths[] = get_stylesheet_directory() . '/resources/views/owc-mijn-services'; return $paths; });
To prioritize your custom template path over the default ones, use this example:
add_filter('owcms::view/template-paths', function ($paths) { $paths[] = get_stylesheet_directory() . '/resources/views/owc-mijn-services'; return array_reverse($paths); });
Change the maximum number of log files
Use the following filter to alter the rotating file handler's max files setting:
apply_filters('owcms::logger/rotating_filer_handler_max_files', OWC_MY_SERVICES_LOGGER_DEFAULT_MAX_FILES)
Intercept exceptions for custom handling
Intercept exceptions caught by the plugin for additional processing or custom logging using this action:
do_action('owcms::exception/intercept', $exception, $method)
The $exception parameter contains the caught exception object
Restricting page access based on authentication requirements
Pages can be protected by enforcing specific authentication methods, such as DigiD and/or eHerkenning. These access rules are configured through the Security metabox in the page editor.
By default, only the page post type supports access restrictions.
This can be customized using the following filter:
apply_filters( 'owcms::gatekeeper/metabox_post_types', array( 'page' ) )
Configure number of redirection posts as option
Defaults to fetching all posts for the configured post types. Increase or limit this value when the query becomes too heavy by applying the filter below:
apply_filters( 'owcms::gatekeeper/metabox_number_of_redirect_options', -1 )
