forked from silverstripe/silverstripe-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.php
41 lines (35 loc) · 1.46 KB
/
_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
use SilverStripe\Admin\CMSMenu;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\CMSPageAddController;
use SilverStripe\CMS\Controllers\CMSPageEditController;
use SilverStripe\CMS\Controllers\CMSPageHistoryController;
use SilverStripe\CMS\Controllers\CMSPageSettingsController;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\Manifest\ModuleLoader;
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
use SilverStripe\View\Parsers\ShortcodeParser;
call_user_func(function () {
$module = ModuleLoader::inst()->getManifest()->getModule('silverstripe/cms');
// Enable insert-link to internal pages
TinyMCEConfig::get('cms')
->enablePlugins([
'sslinkinternal' => $module
->getResource('client/dist/js/TinyMCE_sslink-internal.js'),
'sslinkanchor' => $module
->getResource('client/dist/js/TinyMCE_sslink-anchor.js'),
]);
});
/**
* Register the default internal shortcodes.
*/
ShortcodeParser::get('default')->register(
'sitetree_link',
array(SiteTree::class, 'link_shortcode_handler')
);
// TODO Remove once we can configure CMSMenu through static, nested configuration files
CMSMenu::remove_menu_class(CMSMain::class);
CMSMenu::remove_menu_class(CMSPageEditController::class);
CMSMenu::remove_menu_class(CMSPageSettingsController::class);
CMSMenu::remove_menu_class(CMSPageHistoryController::class);
CMSMenu::remove_menu_class(CMSPageAddController::class);