dmwg / am_custom_formatters
Custom formatters for our fields.
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:drupal-module
Requires
- php: >=8.2
- drupal/core: ^10.3
Requires (Dev)
- drupal/coder: ^8.3
- drupal/core-dev: ^10.3
- ergebnis/composer-normalize: ^2.45
- mglaman/phpstan-drupal: ^1.2
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.12
- phpstan/phpstan-deprecation-rules: ^1.2
- thecodingmachine/phpstan-strict-rules: ^1.0
README
Custom field formatters for dealing with things that are strings, but should
display as something else. We require this approach over using image
or uri
type fields, as a third-party API we depend on can't handle these fields types,
and only accepts plain strings.
Requirements
- PHP
^8.2
drupal/core
(tested on10.3
)1
Installation
# composer require dmwg/am_custom_formatters
Usage
- Enable this module, either via
/admin/modules
, ordrush pm:install am_custom_formatters
- Set the desired field's display formatter to one provided by this package
drush cr
- ???
- Profit!
Contributing
We welcome all and any contributions via Pull Requests to this repository!
Local development environment
For local development, it is highly recommended to install this module into
an existing Drupal codebase, e.g., under web/modules/custom
.
The following example assumes an installation, and clones into web/modules/custom
:
# cd <DRUPAL_ROOT>/web/modules/custom # git clone https://github.com/dmwg/am_custom_formatters # cd am_custom_formatters # composer install
Linting & Static analysis
Please run vendor/bin/phpcs --standard=Drupal
and fix any flagged errors;
vendor/bin/phpcbf --standard=Drupal src
can assist.
Please run vendor/bin/phpstan
and fix any errors; don't let a failing build
discourage you, we'll try and figure it out in the PR.
Authors and acknowledgment
Oliver Baumann <oliver.baumann@uni-bayreuth.de>
- Maintenance
Project status
Alive, but dormant.
Footnotes
-
Older versions might work fine. ↩