FieldTypeCKEditorAdmin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 11 1
1
<?php
2
3
namespace Itstructure\FieldWidgets;
4
5
use Itstructure\CKEditor\CKEditorAdmin;
6
7
/**
8
 * Class FieldTypeCKEditorAdmin
9
 * Class for printing a CKEditor.
10
 *
11
 * @package Itstructure\FieldWidgets
12
 */
13
class FieldTypeCKEditorAdmin extends FieldType
14
{
15
    /**
16
     * @return string
17
     */
18
    public function run(): string
19
    {
20
        return $this->getField()
21
            ->widget(
22
                CKEditorAdmin::class,
23
                [
24
                    'preset' => $this->preset,
25
                    'clientOptions' => $this->getOptions()
26
                ]
27
            )
28
            ->label($this->getLabel());
29
    }
30
}
31