TranslatableEditorToolbarExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateLinkForm() 0 8 1
1
<?php
2
3
class TranslatableEditorToolbarExtension extends DataExtension
4
{
5
    public function updateLinkForm(&$form)
6
    {
7
        $field = new LanguageDropdownField('Language', _t('CMSMain.LANGUAGEDROPDOWNLABEL', 'Language'));
8
        $field->setValue(Translatable::get_current_locale());
9
        $field->setForm($form);
10
        $form->Fields()->insertBefore($field, 'internal');
11
        Requirements::javascript('translatable/javascript/HtmlEditorField.Translatable.js');
12
    }
13
}
14