Problem/Motivation

Currently, displayed information is not too customizable. Also, it's not possible to add custom information to the existing one (for example, it should be useful to be able to display Git information).

Proposed resolution

- Custom service/class to manage information into a common place (this way, someone could even to display it into a custom block).

- Provide a custom hook to allow placing custom content.

Remaining tasks

- Patch on the way.

User interface changes

- Template was refactored to make it simpler.

API changes

- Custom service to provide renderable array of information.

Data model changes

Comments

waspper created an issue. See original summary.

waspper’s picture

StatusFileSize
new12.42 KB
waspper’s picture

Patch done. With that patch, it's possible to do something as following:

use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\system\SystemManager;

function MY_MODULE_version_information_build_alter(SystemManager $system_manager, ModuleHandlerInterface $module_handler, array &$build) {
  $build['#items']['git'] = [
    'type' => 'git',
    'label' => t('Current Git tag'),
    'value' => [
      '#markup' => shell_exec('git describe --tags'),
    ],
  ];
}
waspper’s picture

Status: Active » Needs review
kostyashupenko’s picture

StatusFileSize
new13.49 KB
new977 bytes

neslee canil pinto’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.