LeftAndMainRequirementsExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 1
c 2
b 1
f 1
lcom 0
cbo 3
dl 0
loc 13
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 10 1
1
<?php namespace StudioBonito\SilverStripe\TypeKit\Extensions;
2
3
use Injector;
4
use Requirements;
5
6
/**
7
 * Include the TinyMCE TypeKit plugin with the CMS configured TypeKit ID.
8
 *
9
 * @author       Tom Densham <[email protected]>
10
 * @copyright    Studio Bonito Ltd.
11
 */
12
class LeftAndMainRequirementsExtension extends \LeftAndMainExtension
13
{
14
    public function init()
15
    {
16
        $siteConfigService = Injector::inst()->get('SiteConfig');
17
18
        $siteConfig = $siteConfigService->current_site_config();
19
20
        $vars = array('TypeKitID' => $siteConfig->TypeKitID);
21
22
        Requirements::javascriptTemplate(TYPEKIT_DIR . '/assets/js/tinymce.typekit.js', $vars);
23
    }
24
}
25