Passed
Push — master ( d7466e...1cd753 )
by Damian
02:23
created

AdminHandler::actionComplete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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