Completed
Push — master ( 1e45e0...9c8682 )
by
unknown
17s queued 14s
created

View3DController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A mainAction() 0 17 4
1
<?php
2
/**
3
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
4
 *
5
 * This file is part of the Kitodo and TYPO3 projects.
6
 *
7
 * @license GNU General Public License version 3 or later.
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace Kitodo\Dlf\Controller;
13
14
use Kitodo\Dlf\Common\Doc;
15
16
/**
17
 * Plugin 'View3D' for the 'dlf' extension
18
 *
19
 * @author Beatrycze Volk <[email protected]>
20
 * @package TYPO3
21
 * @subpackage dlf
22
 * @access public
23
 */
24
class View3DController extends AbstractController
25
{
26
    /**
27
     * @return string|void
28
     */
29
    public function mainAction()
30
    {
31
        $this->cObj = $this->configurationManager->getContentObject();
0 ignored issues
show
Bug Best Practice introduced by
The property cObj does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
32
        // Load current document.
33
        $this->loadDocument($this->requestData);
34
        if (
35
            $this->document === null
36
            || $this->document->getDoc() === null
37
            || $this->document->getDoc()->metadataArray['LOG_0001']['type'][0] != 'object'
38
        ) {
39
            // Quit without doing anything if required variables are not set.
40
            return '';
41
        } else {
42
            $this->view->assign('url', '');
43
            $this->view->assign('script.main', '');
44
            $this->view->assign('script.toastify', '');
45
            $this->view->assign('script.spinner', '');
46
        }
47
    }
48
}
49