1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Class BackendController |
5
|
|
|
*/ |
6
|
|
|
|
7
|
|
|
namespace HDNET\OnpageIntegration\Controller; |
8
|
|
|
|
9
|
|
|
use HDNET\OnpageIntegration\Provider\MetaDataProvider; |
10
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility; |
11
|
|
|
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class BackendController |
15
|
|
|
*/ |
16
|
|
|
class BackendController extends ActionController |
17
|
|
|
{ |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var \HDNET\OnpageIntegration\Loader\ApiResultLoader |
21
|
|
|
* @inject |
22
|
|
|
*/ |
23
|
|
|
protected $loader; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Represent the index page |
27
|
|
|
*/ |
28
|
|
|
public function indexAction() |
29
|
|
|
{ |
30
|
|
|
$metaDataProvider = GeneralUtility::makeInstance(MetaDataProvider::class); |
31
|
|
|
|
32
|
|
|
$this->view->assignMultiple([ |
33
|
|
|
'lastCrawl' => $this->loader->load('zoom_lastcrawl'), |
34
|
|
|
'seoMetaData' => $metaDataProvider->getMetaData('seoaspects'), |
35
|
|
|
'contentMetaData' => $metaDataProvider->getMetaData('contentaspects'), |
36
|
|
|
'technicalMetaData' => $metaDataProvider->getMetaData('technicalaspects'), |
37
|
|
|
'moduleName' => 'Zoom Module' |
38
|
|
|
]); |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Handle the detail pages |
43
|
|
|
* |
44
|
|
|
* @param $section |
45
|
|
|
* @param $call |
46
|
|
|
*/ |
47
|
|
|
public function detailAction($section, $call) |
48
|
|
|
{ |
49
|
|
|
$apiCallString = 'zoom_' . $section . '_' . $call . '_table'; |
50
|
|
|
$table = $this->loader->load($apiCallString); |
51
|
|
|
|
52
|
|
|
$layout = ucfirst(str_replace('aspects', '', $section)); |
53
|
|
|
|
54
|
|
|
$this->view->assignMultiple([ |
55
|
|
|
'table' => $table, |
56
|
|
|
'layout' => $layout |
57
|
|
|
]); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Empty Keyword Page |
62
|
|
|
*/ |
63
|
|
|
public function keywordAction() |
64
|
|
|
{ |
65
|
|
|
$this->view->assignMultiple([ |
66
|
|
|
'moduleName' => 'Keyword' |
67
|
|
|
]); |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|