Skip to content

Commit 3cc6a97

Browse files
maxfentonjoshuapease
authored andcommitted
[#69] Add disableEditButton option to module config
1 parent 657037b commit 3cc6a97

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Module.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ function (Event $e) {
129129
View::class,
130130
View::EVENT_END_BODY,
131131
static function (Event $e) {
132+
if (
133+
self::$config['disableEditButton']
134+
) {
135+
return;
136+
}
137+
132138
if (
133139
Craft::$app->config->general->devMode ||
134140
Craft::$app->user->checkPermission('accessCp')
@@ -219,6 +225,7 @@ private function _loadConfig()
219225
'tailwind' => [
220226
'configPath' => Craft::getAlias('@config/tailwind/tailwind.json'),
221227
],
228+
'disableEditButton' => false,
222229
];
223230

224231
$userSettings = Craft::$app->config->getConfigFromFile('viget');

0 commit comments

Comments
 (0)