SearchAdmin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 10
c 1
b 0
f 0
dl 0
loc 34
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 1
1
<?php
2
/**
3
 * class SearchAdmin|Firesphere\SolrSearch\Admins\SearchAdmin Base admin for Synonyms, logs and dirty classes
4
 *
5
 * @package Firesphere\Solr\Search
6
 * @author Simon `Firesphere` Erkelens; Marco `Sheepy` Hermo
7
 * @copyright Copyright (c) 2018 - now() Firesphere & Sheepy
8
 */
9
10
namespace Firesphere\SolrSearch\Admins;
11
12
use Firesphere\SolrSearch\Models\DirtyClass;
13
use Firesphere\SolrSearch\Models\SearchSynonym;
14
use Firesphere\SolrSearch\Models\SolrLog;
15
use SilverStripe\Admin\ModelAdmin;
16
use SilverStripe\View\Requirements;
17
18
/**
19
 * Class \Firesphere\SolrSearch\Admins\SearchAdmin
20
 * Manage or see the Solr configuration. Default implementation of SilverStripe ModelAdmin
21
 * Nothing to see here
22
 *
23
 * @package Firesphere\Solr\Search
24
 */
25
class SearchAdmin extends ModelAdmin
26
{
27
    /**
28
     * @var array Models managed by this admin
29
     */
30
    private static $managed_models = [
31
        SearchSynonym::class,
32
        SolrLog::class,
33
        DirtyClass::class,
34
    ];
35
36
    /**
37
     * @var string Add a pretty magnifying glass to the sidebar menu
38
     */
39
    private static $menu_icon_class = 'font-icon-search';
40
41
    /**
42
     * @var string Where to find me
43
     */
44
    private static $url_segment = 'searchadmin';
45
46
    /**
47
     * @var string My name
48
     */
49
    private static $menu_title = 'Search';
50
51
    /**
52
     * Make sure the custom CSS for highlighting in the GridField is loaded
53
     */
54 1
    public function init()
55
    {
56 1
        parent::init();
57
58 1
        Requirements::css('firesphere/solr-search:client/dist/main.css');
59 1
    }
60
}
61