AdminHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionComplete() 0 5 1
1
<?php
2
3
namespace TractorCow\Fluent\Tests\Extension\FluentAdminTraitTest;
4
5
use SilverStripe\Core\Injector\Injectable;
6
use SilverStripe\Dev\TestOnly;
7
use SilverStripe\Forms\Form;
8
use TractorCow\Fluent\Extension\Traits\FluentAdminTrait;
9
10
/**
11
 * Dummy admin handler to hold trait
12
 */
13
class AdminHandler implements TestOnly
14
{
15
    use FluentAdminTrait;
0 ignored issues
show
introduced by
The trait TractorCow\Fluent\Extens...Traits\FluentAdminTrait requires some properties which are not provided by TractorCow\Fluent\Tests\...nTraitTest\AdminHandler: $ID, $Title, $ClassName
Loading history...
16
    use Injectable;
17
18
    /**
19
     * @param Form   $form
20
     * @param string $message
21
     * @return string
22
     */
23
    public function actionComplete($form, $message)
24
    {
25
        $record = $form->getRecord();
26
        $record->flushCache(true); // Note: Flushes caches E.g. FluentVersionedExtension
27
        return $message;
28
    }
29
}
30