xref: /webtrees/app/Module/CkeditorModule.php (revision 43b1a91c1ee18d33be308adb1f31ec9b5678c6d7)
18c2e8227SGreg Roach<?php
28c2e8227SGreg Roach/**
38c2e8227SGreg Roach * webtrees: online genealogy
48fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team
58c2e8227SGreg Roach * This program is free software: you can redistribute it and/or modify
68c2e8227SGreg Roach * it under the terms of the GNU General Public License as published by
78c2e8227SGreg Roach * the Free Software Foundation, either version 3 of the License, or
88c2e8227SGreg Roach * (at your option) any later version.
98c2e8227SGreg Roach * This program is distributed in the hope that it will be useful,
108c2e8227SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
118c2e8227SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
128c2e8227SGreg Roach * GNU General Public License for more details.
138c2e8227SGreg Roach * You should have received a copy of the GNU General Public License
148c2e8227SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
158c2e8227SGreg Roach */
16e7f56f2aSGreg Roachdeclare(strict_types=1);
17e7f56f2aSGreg Roach
1876692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module;
1976692c8bSGreg Roach
200e62c4b8SGreg Roachuse Fisharebest\Webtrees\I18N;
218c2e8227SGreg Roach
228c2e8227SGreg Roach/**
238c2e8227SGreg Roach * Class CkeditorModule
248c2e8227SGreg Roach */
25*43b1a91cSGreg Roachclass CkeditorModule extends AbstractModule implements ModuleExternalUrlInterface
26c1010edaSGreg Roach{
27*43b1a91cSGreg Roach    use ModuleExternalUrlTrait;
28*43b1a91cSGreg Roach
2949a243cbSGreg Roach    // Location of our installation of CK editor.
30a2937259SGreg Roach    public const CKEDITOR_PATH = 'public/ckeditor-4.11.2-custom/';
3149a243cbSGreg Roach
32961ec755SGreg Roach    /**
33961ec755SGreg Roach     * How should this module be labelled on tabs, menus, etc.?
34961ec755SGreg Roach     *
35961ec755SGreg Roach     * @return string
36961ec755SGreg Roach     */
3749a243cbSGreg Roach    public function title(): string
38c1010edaSGreg Roach    {
39bbb76c12SGreg Roach        /* I18N: Name of a module. CKEditor is a trademark. Do not translate it? http://ckeditor.com */
40bbb76c12SGreg Roach        return I18N::translate('CKEditor™');
418c2e8227SGreg Roach    }
428c2e8227SGreg Roach
43961ec755SGreg Roach    /**
44961ec755SGreg Roach     * A sentence describing what this module does.
45961ec755SGreg Roach     *
46961ec755SGreg Roach     * @return string
47961ec755SGreg Roach     */
4849a243cbSGreg Roach    public function description(): string
49c1010edaSGreg Roach    {
50bbb76c12SGreg Roach        /* I18N: Description of the “CKEditor” module. WYSIWYG = “what you see is what you get” */
51bbb76c12SGreg Roach        return I18N::translate('Allow other modules to edit text using a “WYSIWYG” editor, instead of using HTML codes.');
528c2e8227SGreg Roach    }
53*43b1a91cSGreg Roach
54*43b1a91cSGreg Roach    /**
55*43b1a91cSGreg Roach     * Home page for the service.
56*43b1a91cSGreg Roach     *
57*43b1a91cSGreg Roach     * @return string
58*43b1a91cSGreg Roach     */
59*43b1a91cSGreg Roach    public function externalUrl(): string
60*43b1a91cSGreg Roach    {
61*43b1a91cSGreg Roach        return 'https://ckeditor.com';
62*43b1a91cSGreg Roach    }
638c2e8227SGreg Roach}
64