Passed
Push — master ( c59f14...22b8ef )
by Daniel
04:29 queued 17s
created

UnstagedRecord::CMSEditLink()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SilverStripe\CMS\Tests\Controllers\SilverStripeNavigatorTest;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\ORM\CMSPreviewable;
7
use SilverStripe\ORM\DataObject;
8
use SilverStripe\Versioned\Versioned;
9
10
/**
11
 * Versioned but not staged
12
 */
13
class UnstagedRecord extends DataObject implements TestOnly, CMSPreviewable
14
{
15
    private static $table_name = 'SilverStripeNavigatorTest_UnversionedRecord';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
16
17
    private static $extensions = [
0 ignored issues
show
introduced by
The private property $extensions is not used, and could be removed.
Loading history...
18
        Versioned::class . '.versioned',
19
    ];
20
21
    public function PreviewLink($action = null)
22
    {
23
        return null;
24
    }
25
26
    /**
27
     * To determine preview mechanism (e.g. embedded / iframe)
28
     *
29
     * @return string
30
     */
31
    public function getMimeType()
32
    {
33
        return 'text/html';
34
    }
35
36
    public function CMSEditLink()
37
    {
38
        return null;
39
    }
40
}
41