dmwg/wisski_trails

Drupal module that shows a document-graph visualisation in an iframe on the entity detail page.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 1

Type:drupal-module

pkg:composer/dmwg/wisski_trails

1.0.0 2025-10-08 09:25 UTC

This package is auto-updated.

Last update: 2025-10-08 09:31:06 UTC


README

CI PHP Version Drupal Version License Latest Version

A Drupal module that displays document-graph visualizations in an iframe on entity detail pages. This module depends on hitherto unreleased data-processing infrastructure and is not usable out of the box!

Description

WissKI Trails provides a configurable block that can be placed on entity detail pages to display interactive document-graph visualizations. The module integrates with the WissKI ecosystem, allowing users to explore relationships between entities through visual representations.

The visualization is loaded via an iframe from a configurable external service, with the entity ID automatically passed to construct the appropriate visualization URL.

Requirements

  • php>=8.3
  • Drupal 10.3 or higher (also compatible with Drupal 11)
  • Drupal Views module (core)

Installation

Via Composer (recommended)

composer require dmwg/wisski_trails

Then enable the module:

drush en wisski_trails

Or via the Drupal admin interface at admin/modules.

Manual Installation

  1. Download the module from GitHub
  2. Extract to your Drupal installation's modules/contrib directory
  3. Enable the module via Drush or the admin interface

Configuration

Module Configuration

  1. Navigate to Configuration > Web Services > WissKI Trails (/admin/config/wisski_trails)
  2. Set the Base URL for your visualization service
  3. Save the configuration

The iframe URL will be constructed as: {base_url}/{entity_id}

Block Placement

  1. Navigate to Structure > Block layout (/admin/structure/block)
  2. Click Place block in your desired region
  3. Find and place the WissKI Trails block
  4. Configure visibility settings as needed (typically restricted to entity detail pages)
  5. Save the block configuration

Usage

Once configured and placed, the block will automatically:

  1. Detect the current entity ID on entity detail pages
  2. Construct the iframe URL using the configured base URL
  3. Display the visualization iframe if an entity ID is found

Development

Prerequisites

  • Composer installed
  • PHP 8.3 or 8.4
  • Git

Getting Started

Clone the repository and install dependencies:

git clone https://github.com/dmwg/wisski_trails.git
cd wisski_trails
composer install

Available Commands

Code Quality

Check coding style (Drupal standards):

composer codingstyle
# Aliases: composer cs, composer style

Auto-fix coding style violations:

composer codingstyle-fix
# Aliases: composer fix, composer csfix, composer stylefix

Run static analysis with PHPStan (level 5):

composer phpstan
# Alias: composer stan

Normalize composer.json:

composer normalize

Testing

Run unit tests:

composer test

Run tests with coverage report (requires Xdebug or PCOV):

composer test-coverage

Pre-commit Workflow

Before committing changes, run all quality checks:

composer codingstyle-fix \
  && composer codingstyle \
  && composer phpstan \
  && composer test

Coding Standards

  • Standard: Drupal coding standards
  • PHPStan Level: 5
  • Namespace: Drupal\wisski_trails\
  • PSR-4 Autoloading: src/ directory

Maintainers

Current maintainer:

Contributing

Issues and pull requests are welcome on GitHub.

License

This project is licensed under GPL-3.0-or-later. See the LICENSE file for details.

Support