Skip to content

Commit

Permalink
modified: Plugin.php
Browse files Browse the repository at this point in the history
	modified:   models/settings/fields.yaml
  • Loading branch information
Helmut Kaufmann committed Feb 12, 2022
1 parent 26d5fdb commit 02663db
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
22 changes: 17 additions & 5 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
* @see http://twig.sensiolabs.org/doc/extensions/index.html#extensions-install
*/
class Plugin extends PluginBase {

/**
* Registers any back-end permissions used by this plugin.
*
* @return array
*/
public function registerPermissions() {
return ['mercator.twigextensions.configuration' => ['tab' => 'Twig Extensions', 'label' => 'Manage configuration', ],

];
}

/**
* @var boolean Determine if this plugin should have elevated privileges.
*/
Expand All @@ -32,7 +44,9 @@ class Plugin extends PluginBase {
* @return array
*/
public function pluginDetails() {
return ['name' => 'Twig Extensions', 'description' => "Extensive Twig extension library for Winter CMS, providing Laravel native functionality, such as caching, sessions, cryptography, access to directories, files/storage, and many more. Replacement October's Twig Extensions plugin.", 'author' => 'Helmut Kaufmann', 'icon' => 'icon-plus', 'homepage' => 'https://github.com/helmutkaufmann/wn-twigext-plugin', ];
return ['name' => 'Twig Extensions', 'description' => "Extensive Twig extension library for Winter CMS, providing Laravel native functionality, such as caching, sessions, cryptography, access to directories, files/storage, and many more.",
'author' => 'Helmut Kaufmann', 'icon' => 'icon-plus', 'homepage' => 'https://github.com/helmutkaufmann/wn-twigext-plugin', 'permissions' => ['mercator.twigextensions.configuration'],
'category' => 'mercator', 'icon' => 'icon-cog',];
}

public function boot() {
Expand Down Expand Up @@ -487,13 +501,11 @@ private function getFileRevision() {
}
, ];
}
public function registerPermissions() {
return ['mercator.twigext.twigextperm' => ['tab' => 'Twig Extensions', 'label' => 'Permission For Twig Extensions', ], ];
}

public function registerSettings() {

return ['settings' => ['label' => 'Twig Extensions', 'description' => 'Configuration/Defaults', 'category' => 'Mrercator', 'icon' => 'icon-cog', 'class' => 'Mercator\TwigExt\Models\Settings', 'order' => 500, 'keywords' => 'Twig Extensions Meractor', 'permissions' => ['mercator.twigext.twigextperm']]];
return ['settings' => ['label' => 'Twig Extensions', 'description' => 'Twig extension library providing Laravel native functionality, such as caching, sessions, cryptography, access to directories, files/storage, and many more.',
'category' => 'mercator', 'icon' => 'icon-cog', 'class' => 'Mercator\TwigExt\Models\Settings', 'order' => 500, 'keywords' => 'Helmut Kaufmann Twig Extensions Mercator', 'permissions' => ['mercator.twigext.twigextperm']]];

}
}
13 changes: 6 additions & 7 deletions models/settings/fields.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
tabs:
stretch: true
defaultTab: Communication
defaultTab: Twig Extensions

fields:
info_section_1:
label: Telegram
type: section
tab: Communication

telegram_bot:
label: Default Telegram BOT ID
span: left
type: text
comment: Default Chat ID to be used for Telegram communication
tab: Communication

telegram_chat:
label: DefaultTelegram Chat ID
span: right
type: text
comment: Default ChatBOT ID to be used for Telegram communication.
tab: Communication

info_section_2:
label: Email
type: section
tab: Communication

mail_default:
label: Default Email Address
span: left
type: text
comment: Default email address to be used when none is specified explicitly
tab: Communication

0 comments on commit 02663db

Please sign in to comment.