updateLinkForm()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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