Download the PHP package s1syphos/kirby3-gesetze without Composer
On this page you can find all versions of the php package s1syphos/kirby3-gesetze. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download s1syphos/kirby3-gesetze
More information about s1syphos/kirby3-gesetze
Files in s1syphos/kirby3-gesetze
Package kirby3-gesetze
Short Description Linking german legal norms for Kirby v3, dependency-free & GDPR-friendly
License MIT
Informations about the package kirby3-gesetze
Kirby3 Gesetze
This plugin automatically links german legal norms - dependency-free & GDPR-friendly, powered by php-gesetze
.
Getting started
Use one of the following methods to install & use kirby3-gesetze
:
Git submodule
If you know your way around Git, you can download this plugin as a submodule:
Composer
Clone or download
Usage
Quick demonstration:
This markdown text
content ..
.. easily ..
.. becomes:
Configuration
You may change certain options from your config.php
globally ('kirby3-gesetze.optionName'
):
Option | Type | Default | Description |
---|---|---|---|
'enabled' |
bool | false |
Enables kirbytext:after hook |
'allowList' |
array | [] |
Allowed template names |
'blockList' |
array | [] |
Blocked template names |
'attributes' |
array | [] |
Controls HTML attributes |
'validate' |
bool | true |
Enable/disable validation |
'title' |
string | 'full' |
Controls title attribute. Possible values: false , 'light' , 'normal' , 'full' |
'drivers.preferred ' |
string | 'gesetze' |
Preferred driver. Possible values: 'gesetze' , 'dejure' , 'buzer' , 'lexparency' |
'drivers.blockList ' |
array | [] |
Unallowed driver(s). Possible values: see drivers.preferred |
When enabling the plugin via kirby3-gesetze.enabled
, auto-linking is applied to all kirbytext()
/ kt()
calls, with two exceptions:
- If a page's
intendedTemplate()
name is allow(list)ed, this overrideskirby3-gesetze.enabled
beingfalse
- If a page's
intendedTemplate()
name is block(list)ed, this overrideskirby3-gesetze.enabled
beingtrue
Besides that, there are additional methods you can use:
Methods
There are several ways to do this, you can either use a standalone function, a page method or a field method:
Method: gesetzify(string $text): string
Processes (valid) legal norms throughout given text
Page method: $page->gesetzify(string $text)
Same as gesetzify
Field method: $field->gesetzify(string $text, bool $inline = false)
Same as gesetzify
, but supports applying kt()
/ kti()
via $inline
option.
Roadmap
- [ ] Add tests
Credits / License
kirby3-gesetze
is based on php-gesetze
library. It is licensed under the buy a license.
Special Thanks
I'd like to thank everybody that's making great software - you people are awesome. Also I'm always thankful for feedback and bug reports :)