Completed
Push — master ( 5c161a...b70884 )
by Fabien
52:39
created
Classes/Tool/ModulePreferencesTool.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ModulePreferences/Launcher.html';
46 46
         $view = $this->initializeStandaloneView($templateNameAndPath);
47
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
47
+        $view->assign('sitePath', Environment::getPublicPath().'/');
48 48
         return $view->render();
49 49
     }
50 50
 
Please login to merge, or discard this patch.
Indentation   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -22,121 +22,121 @@
 block discarded – undo
22 22
  */
23 23
 class ModulePreferencesTool extends AbstractTool
24 24
 {
25
-    /**
26
-     * Display the title of the tool on the welcome screen.
27
-     *
28
-     * @return string
29
-     */
30
-    public function getTitle()
31
-    {
32
-        return LocalizationUtility::translate(
33
-            'module_preferences_for',
34
-            'vidi',
35
-            array(Tca::table($this->getModuleLoader()->getDataType())->getTitle())
36
-        );
37
-    }
38
-
39
-    /**
40
-     * Display the description of the tool in the welcome screen.
41
-     *
42
-     * @return string
43
-     */
44
-    public function getDescription()
45
-    {
46
-        $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ModulePreferences/Launcher.html';
47
-        $view = $this->initializeStandaloneView($templateNameAndPath);
48
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
49
-        return $view->render();
50
-    }
51
-
52
-    /**
53
-     * Do the job!
54
-     *
55
-     * @param array $arguments
56
-     * @return string
57
-     */
58
-    public function work(array $arguments = array())
59
-    {
60
-        if (isset($arguments['save'])) {
61
-            // Revert visible <-> excluded
62
-            $excludedFields = array_diff(
63
-                Tca::grid()->getAllFieldNames(),
64
-                $arguments['excluded_fields'],
65
-                $this->getExcludedFieldsFromTca()
66
-            );
67
-            $arguments['excluded_fields'] = $excludedFields;
68
-            $this->getModulePreferences()->save($arguments);
69
-        }
70
-
71
-        $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ModulePreferences/WorkResult.html';
72
-        $view = $this->initializeStandaloneView($templateNameAndPath);
73
-
74
-        $view->assign('title', Tca::table($this->getModuleLoader()->getDataType())->getTitle());
75
-
76
-        // Fetch the menu of visible items.
77
-        $menuVisibleItems = $this->getModulePreferences()->get(ConfigurablePart::MENU_VISIBLE_ITEMS);
78
-        $view->assign(ConfigurablePart::MENU_VISIBLE_ITEMS, $menuVisibleItems);
79
-
80
-        // Fetch the default number of menu visible items.
81
-        $menuDefaultVisible = $this->getModulePreferences()->get(ConfigurablePart::MENU_VISIBLE_ITEMS_DEFAULT);
82
-        $view->assign(ConfigurablePart::MENU_VISIBLE_ITEMS_DEFAULT, $menuDefaultVisible);
83
-
84
-        // Get the visible columns
85
-        $view->assign('columns', Tca::grid()->getAllFieldNames());
86
-
87
-        return $view->render();
88
-    }
89
-
90
-    /**
91
-     * @return array
92
-     */
93
-    protected function getExcludedFieldsFromTca()
94
-    {
95
-        $tca = Tca::grid()->getTca();
96
-        $excludedFields = [];
97
-        if (!empty($tca['excluded_fields'])) {
98
-            $excludedFields = GeneralUtility::trimExplode(',', $tca['excluded_fields'], true);
99
-        } elseif (!empty($tca['export']['excluded_fields'])) { // only for export for legacy reason.
100
-            $excludedFields = GeneralUtility::trimExplode(',', $tca['export']['excluded_fields'], true);
101
-        }
102
-        return $excludedFields;
103
-    }
104
-
105
-    /**
106
-     * Tell whether the tools should be displayed according to the context.
107
-     *
108
-     * @return bool
109
-     */
110
-    public function isShown()
111
-    {
112
-        return $this->getBackendUser()->isAdmin();
113
-    }
114
-
115
-    /**
116
-     * Get the Vidi Module Loader.
117
-     *
118
-     * @return ModuleLoader|object
119
-     */
120
-    protected function getModuleLoader()
121
-    {
122
-        return GeneralUtility::makeInstance(ModuleLoader::class);
123
-    }
124
-
125
-    /**
126
-     * @return ModulePreferences|object
127
-     */
128
-    protected function getModulePreferences()
129
-    {
130
-        return GeneralUtility::makeInstance(ModulePreferences::class);
131
-    }
132
-
133
-    /**
134
-     * Get the Vidi Module Loader.
135
-     *
136
-     * @return GridAnalyserService|object
137
-     */
138
-    protected function getGridAnalyserService()
139
-    {
140
-        return GeneralUtility::makeInstance(GridAnalyserService::class);
141
-    }
25
+	/**
26
+	 * Display the title of the tool on the welcome screen.
27
+	 *
28
+	 * @return string
29
+	 */
30
+	public function getTitle()
31
+	{
32
+		return LocalizationUtility::translate(
33
+			'module_preferences_for',
34
+			'vidi',
35
+			array(Tca::table($this->getModuleLoader()->getDataType())->getTitle())
36
+		);
37
+	}
38
+
39
+	/**
40
+	 * Display the description of the tool in the welcome screen.
41
+	 *
42
+	 * @return string
43
+	 */
44
+	public function getDescription()
45
+	{
46
+		$templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ModulePreferences/Launcher.html';
47
+		$view = $this->initializeStandaloneView($templateNameAndPath);
48
+		$view->assign('sitePath', Environment::getPublicPath() . '/');
49
+		return $view->render();
50
+	}
51
+
52
+	/**
53
+	 * Do the job!
54
+	 *
55
+	 * @param array $arguments
56
+	 * @return string
57
+	 */
58
+	public function work(array $arguments = array())
59
+	{
60
+		if (isset($arguments['save'])) {
61
+			// Revert visible <-> excluded
62
+			$excludedFields = array_diff(
63
+				Tca::grid()->getAllFieldNames(),
64
+				$arguments['excluded_fields'],
65
+				$this->getExcludedFieldsFromTca()
66
+			);
67
+			$arguments['excluded_fields'] = $excludedFields;
68
+			$this->getModulePreferences()->save($arguments);
69
+		}
70
+
71
+		$templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ModulePreferences/WorkResult.html';
72
+		$view = $this->initializeStandaloneView($templateNameAndPath);
73
+
74
+		$view->assign('title', Tca::table($this->getModuleLoader()->getDataType())->getTitle());
75
+
76
+		// Fetch the menu of visible items.
77
+		$menuVisibleItems = $this->getModulePreferences()->get(ConfigurablePart::MENU_VISIBLE_ITEMS);
78
+		$view->assign(ConfigurablePart::MENU_VISIBLE_ITEMS, $menuVisibleItems);
79
+
80
+		// Fetch the default number of menu visible items.
81
+		$menuDefaultVisible = $this->getModulePreferences()->get(ConfigurablePart::MENU_VISIBLE_ITEMS_DEFAULT);
82
+		$view->assign(ConfigurablePart::MENU_VISIBLE_ITEMS_DEFAULT, $menuDefaultVisible);
83
+
84
+		// Get the visible columns
85
+		$view->assign('columns', Tca::grid()->getAllFieldNames());
86
+
87
+		return $view->render();
88
+	}
89
+
90
+	/**
91
+	 * @return array
92
+	 */
93
+	protected function getExcludedFieldsFromTca()
94
+	{
95
+		$tca = Tca::grid()->getTca();
96
+		$excludedFields = [];
97
+		if (!empty($tca['excluded_fields'])) {
98
+			$excludedFields = GeneralUtility::trimExplode(',', $tca['excluded_fields'], true);
99
+		} elseif (!empty($tca['export']['excluded_fields'])) { // only for export for legacy reason.
100
+			$excludedFields = GeneralUtility::trimExplode(',', $tca['export']['excluded_fields'], true);
101
+		}
102
+		return $excludedFields;
103
+	}
104
+
105
+	/**
106
+	 * Tell whether the tools should be displayed according to the context.
107
+	 *
108
+	 * @return bool
109
+	 */
110
+	public function isShown()
111
+	{
112
+		return $this->getBackendUser()->isAdmin();
113
+	}
114
+
115
+	/**
116
+	 * Get the Vidi Module Loader.
117
+	 *
118
+	 * @return ModuleLoader|object
119
+	 */
120
+	protected function getModuleLoader()
121
+	{
122
+		return GeneralUtility::makeInstance(ModuleLoader::class);
123
+	}
124
+
125
+	/**
126
+	 * @return ModulePreferences|object
127
+	 */
128
+	protected function getModulePreferences()
129
+	{
130
+		return GeneralUtility::makeInstance(ModulePreferences::class);
131
+	}
132
+
133
+	/**
134
+	 * Get the Vidi Module Loader.
135
+	 *
136
+	 * @return GridAnalyserService|object
137
+	 */
138
+	protected function getGridAnalyserService()
139
+	{
140
+		return GeneralUtility::makeInstance(GridAnalyserService::class);
141
+	}
142 142
 }
Please login to merge, or discard this patch.
Classes/Tool/RelationAnalyserTool.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html';
42 42
         $view = $this->initializeStandaloneView($templateNameAndPath);
43
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
43
+        $view->assign('sitePath', Environment::getPublicPath().'/');
44 44
         $view->assign('dataType', $this->getModuleLoader()->getDataType());
45 45
         return $view->render();
46 46
     }
Please login to merge, or discard this patch.
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -19,86 +19,86 @@
 block discarded – undo
19 19
  */
20 20
 class RelationAnalyserTool extends AbstractTool
21 21
 {
22
-    /**
23
-     * Display the title of the tool on the welcome screen.
24
-     *
25
-     * @return string
26
-     */
27
-    public function getTitle(): string
28
-    {
29
-        return LocalizationUtility::translate(
30
-            'analyse_relations',
31
-            'vidi'
32
-        );
33
-    }
22
+	/**
23
+	 * Display the title of the tool on the welcome screen.
24
+	 *
25
+	 * @return string
26
+	 */
27
+	public function getTitle(): string
28
+	{
29
+		return LocalizationUtility::translate(
30
+			'analyse_relations',
31
+			'vidi'
32
+		);
33
+	}
34 34
 
35
-    /**
36
-     * Display the description of the tool in the welcome screen.
37
-     *
38
-     * @return string
39
-     */
40
-    public function getDescription(): string
41
-    {
42
-        $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html';
43
-        $view = $this->initializeStandaloneView($templateNameAndPath);
44
-        $view->assign('sitePath', Environment::getPublicPath() . '/');
45
-        $view->assign('dataType', $this->getModuleLoader()->getDataType());
46
-        return $view->render();
47
-    }
35
+	/**
36
+	 * Display the description of the tool in the welcome screen.
37
+	 *
38
+	 * @return string
39
+	 */
40
+	public function getDescription(): string
41
+	{
42
+		$templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html';
43
+		$view = $this->initializeStandaloneView($templateNameAndPath);
44
+		$view->assign('sitePath', Environment::getPublicPath() . '/');
45
+		$view->assign('dataType', $this->getModuleLoader()->getDataType());
46
+		return $view->render();
47
+	}
48 48
 
49
-    /**
50
-     * Do the job
51
-     *
52
-     * @param array $arguments
53
-     * @return string
54
-     */
55
-    public function work(array $arguments = array()): string
56
-    {
57
-        $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/WorkResult.html';
58
-        $view = $this->initializeStandaloneView($templateNameAndPath);
49
+	/**
50
+	 * Do the job
51
+	 *
52
+	 * @param array $arguments
53
+	 * @return string
54
+	 */
55
+	public function work(array $arguments = array()): string
56
+	{
57
+		$templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/WorkResult.html';
58
+		$view = $this->initializeStandaloneView($templateNameAndPath);
59 59
 
60
-        $dataType = $this->getModuleLoader()->getDataType();
61
-        $analyse = $this->getGridAnalyserService()->checkRelationForTable($dataType);
60
+		$dataType = $this->getModuleLoader()->getDataType();
61
+		$analyse = $this->getGridAnalyserService()->checkRelationForTable($dataType);
62 62
 
63
-        if (empty($analyse)) {
64
-            $result = 'No relation involved in this Grid.';
65
-        } else {
66
-            $result = implode("\n", $analyse);
67
-        }
63
+		if (empty($analyse)) {
64
+			$result = 'No relation involved in this Grid.';
65
+		} else {
66
+			$result = implode("\n", $analyse);
67
+		}
68 68
 
69
-        $view->assign('result', $result);
70
-        $view->assign('dataType', $dataType);
69
+		$view->assign('result', $result);
70
+		$view->assign('dataType', $dataType);
71 71
 
72
-        return $view->render();
73
-    }
72
+		return $view->render();
73
+	}
74 74
 
75
-    /**
76
-     * Tell whether the tools should be displayed according to the context.
77
-     *
78
-     * @return bool
79
-     */
80
-    public function isShown(): bool
81
-    {
82
-        return $this->getBackendUser()->isAdmin();
83
-    }
75
+	/**
76
+	 * Tell whether the tools should be displayed according to the context.
77
+	 *
78
+	 * @return bool
79
+	 */
80
+	public function isShown(): bool
81
+	{
82
+		return $this->getBackendUser()->isAdmin();
83
+	}
84 84
 
85
-    /**
86
-     * Get the Vidi Module Loader.
87
-     *
88
-     * @return ModuleLoader|object
89
-     */
90
-    protected function getModuleLoader(): ModuleLoader
91
-    {
92
-        return GeneralUtility::makeInstance(ModuleLoader::class);
93
-    }
85
+	/**
86
+	 * Get the Vidi Module Loader.
87
+	 *
88
+	 * @return ModuleLoader|object
89
+	 */
90
+	protected function getModuleLoader(): ModuleLoader
91
+	{
92
+		return GeneralUtility::makeInstance(ModuleLoader::class);
93
+	}
94 94
 
95
-    /**
96
-     * Get the Vidi Module Loader.
97
-     *
98
-     * @return GridAnalyserService|object
99
-     */
100
-    protected function getGridAnalyserService()
101
-    {
102
-        return GeneralUtility::makeInstance(GridAnalyserService::class);
103
-    }
95
+	/**
96
+	 * Get the Vidi Module Loader.
97
+	 *
98
+	 * @return GridAnalyserService|object
99
+	 */
100
+	protected function getGridAnalyserService()
101
+	{
102
+		return GeneralUtility::makeInstance(GridAnalyserService::class);
103
+	}
104 104
 }
Please login to merge, or discard this patch.
Classes/Tool/ConfiguredPidTool.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ConfiguredPid/Launcher.html';
43 43
         $view = $this->initializeStandaloneView($templateNameAndPath);
44 44
         $view->assignMultiple([
45
-            'sitePath' => Environment::getPublicPath() . '/',
45
+            'sitePath' => Environment::getPublicPath().'/',
46 46
             'dataType' => $this->getModuleLoader()->getDataType(),
47 47
             'configuredPid' => $this->getModulePidService()->getConfiguredNewRecordPid(),
48 48
             'errors' => $this->getModulePidService()->validateConfiguredPid(),
Please login to merge, or discard this patch.
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -19,76 +19,76 @@
 block discarded – undo
19 19
  */
20 20
 class ConfiguredPidTool extends AbstractTool
21 21
 {
22
-    /**
23
-     * Display the title of the tool on the welcome screen.
24
-     *
25
-     * @return string
26
-     */
27
-    public function getTitle(): string
28
-    {
29
-        return sprintf(
30
-            '%s (%s)',
31
-            LocalizationUtility::translate('tool.configured_pid', 'vidi'),
32
-            $this->getModulePidService()->getConfiguredNewRecordPid()
33
-        );
34
-    }
22
+	/**
23
+	 * Display the title of the tool on the welcome screen.
24
+	 *
25
+	 * @return string
26
+	 */
27
+	public function getTitle(): string
28
+	{
29
+		return sprintf(
30
+			'%s (%s)',
31
+			LocalizationUtility::translate('tool.configured_pid', 'vidi'),
32
+			$this->getModulePidService()->getConfiguredNewRecordPid()
33
+		);
34
+	}
35 35
 
36
-    /**
37
-     * Display the description of the tool in the welcome screen.
38
-     *
39
-     * @return string
40
-     */
41
-    public function getDescription(): string
42
-    {
43
-        $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ConfiguredPid/Launcher.html';
44
-        $view = $this->initializeStandaloneView($templateNameAndPath);
45
-        $view->assignMultiple([
46
-            'sitePath' => Environment::getPublicPath() . '/',
47
-            'dataType' => $this->getModuleLoader()->getDataType(),
48
-            'configuredPid' => $this->getModulePidService()->getConfiguredNewRecordPid(),
49
-            'errors' => $this->getModulePidService()->validateConfiguredPid(),
50
-        ]);
36
+	/**
37
+	 * Display the description of the tool in the welcome screen.
38
+	 *
39
+	 * @return string
40
+	 */
41
+	public function getDescription(): string
42
+	{
43
+		$templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ConfiguredPid/Launcher.html';
44
+		$view = $this->initializeStandaloneView($templateNameAndPath);
45
+		$view->assignMultiple([
46
+			'sitePath' => Environment::getPublicPath() . '/',
47
+			'dataType' => $this->getModuleLoader()->getDataType(),
48
+			'configuredPid' => $this->getModulePidService()->getConfiguredNewRecordPid(),
49
+			'errors' => $this->getModulePidService()->validateConfiguredPid(),
50
+		]);
51 51
 
52
-        return $view->render();
53
-    }
52
+		return $view->render();
53
+	}
54 54
 
55
-    /**
56
-     * Do the job
57
-     *
58
-     * @param array $arguments
59
-     * @return string
60
-     */
61
-    public function work(array $arguments = array()): string
62
-    {
63
-        return '';
64
-    }
55
+	/**
56
+	 * Do the job
57
+	 *
58
+	 * @param array $arguments
59
+	 * @return string
60
+	 */
61
+	public function work(array $arguments = array()): string
62
+	{
63
+		return '';
64
+	}
65 65
 
66
-    /**
67
-     * Tell whether the tools should be displayed according to the context.
68
-     *
69
-     * @return bool
70
-     */
71
-    public function isShown(): bool
72
-    {
73
-        return $this->getBackendUser()->isAdmin();
74
-    }
66
+	/**
67
+	 * Tell whether the tools should be displayed according to the context.
68
+	 *
69
+	 * @return bool
70
+	 */
71
+	public function isShown(): bool
72
+	{
73
+		return $this->getBackendUser()->isAdmin();
74
+	}
75 75
 
76
-    /**
77
-     * Get the Vidi Module Loader.
78
-     *
79
-     * @return ModuleLoader|object
80
-     */
81
-    protected function getModuleLoader(): ModuleLoader
82
-    {
83
-        return GeneralUtility::makeInstance(ModuleLoader::class);
84
-    }
76
+	/**
77
+	 * Get the Vidi Module Loader.
78
+	 *
79
+	 * @return ModuleLoader|object
80
+	 */
81
+	protected function getModuleLoader(): ModuleLoader
82
+	{
83
+		return GeneralUtility::makeInstance(ModuleLoader::class);
84
+	}
85 85
 
86
-    /**
87
-     * @return ModulePidService|object
88
-     */
89
-    public function getModulePidService()
90
-    {
91
-        /** @var ModulePidService $modulePidService */
92
-        return GeneralUtility::makeInstance(ModulePidService::class);
93
-    }
86
+	/**
87
+	 * @return ModulePidService|object
88
+	 */
89
+	public function getModulePidService()
90
+	{
91
+		/** @var ModulePidService $modulePidService */
92
+		return GeneralUtility::makeInstance(ModulePidService::class);
93
+	}
94 94
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Be/AdditionalAssetsViewHelper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@
 block discarded – undo
58 58
     protected function resolvePath($uri)
59 59
     {
60 60
         $uri = GeneralUtility::getFileAbsFileName($uri);
61
-        $uri = substr($uri, strlen(Environment::getPublicPath() . '/'));
61
+        $uri = substr($uri, strlen(Environment::getPublicPath().'/'));
62 62
         if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend() && $uri !== false) {
63
-            $uri = '../' . $uri;
63
+            $uri = '../'.$uri;
64 64
         }
65 65
         return $uri;
66 66
     }
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -20,42 +20,42 @@
 block discarded – undo
20 20
  */
21 21
 class AdditionalAssetsViewHelper extends AbstractBackendViewHelper
22 22
 {
23
-    /**
24
-     * Load the assets (JavaScript, CSS) for this Vidi module.
25
-     *
26
-     * @return void
27
-     * @api
28
-     */
29
-    public function render()
30
-    {
31
-        $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
32
-        /** @var ModuleLoader $moduleLoader */
33
-        $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class);
23
+	/**
24
+	 * Load the assets (JavaScript, CSS) for this Vidi module.
25
+	 *
26
+	 * @return void
27
+	 * @api
28
+	 */
29
+	public function render()
30
+	{
31
+		$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
32
+		/** @var ModuleLoader $moduleLoader */
33
+		$moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class);
34 34
 
35
-        foreach ($moduleLoader->getAdditionalStyleSheetFiles() as $addCssFile) {
36
-            $fileNameAndPath = $this->resolvePath($addCssFile);
37
-            $pageRenderer->addCssFile($fileNameAndPath);
38
-        }
35
+		foreach ($moduleLoader->getAdditionalStyleSheetFiles() as $addCssFile) {
36
+			$fileNameAndPath = $this->resolvePath($addCssFile);
37
+			$pageRenderer->addCssFile($fileNameAndPath);
38
+		}
39 39
 
40
-        foreach ($moduleLoader->getAdditionalJavaScriptFiles() as $addJsFile) {
41
-            $fileNameAndPath = $this->resolvePath($addJsFile);
42
-            $pageRenderer->addJsFile($fileNameAndPath);
43
-        }
44
-    }
40
+		foreach ($moduleLoader->getAdditionalJavaScriptFiles() as $addJsFile) {
41
+			$fileNameAndPath = $this->resolvePath($addJsFile);
42
+			$pageRenderer->addJsFile($fileNameAndPath);
43
+		}
44
+	}
45 45
 
46
-    /**
47
-     * Resolve a resource path.
48
-     *
49
-     * @param string $uri
50
-     * @return string
51
-     */
52
-    protected function resolvePath($uri)
53
-    {
54
-        $uri = GeneralUtility::getFileAbsFileName($uri);
55
-        $uri = substr($uri, strlen(Environment::getPublicPath() . '/'));
56
-        if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend() && $uri !== false) {
57
-            $uri = '../' . $uri;
58
-        }
59
-        return $uri;
60
-    }
46
+	/**
47
+	 * Resolve a resource path.
48
+	 *
49
+	 * @param string $uri
50
+	 * @return string
51
+	 */
52
+	protected function resolvePath($uri)
53
+	{
54
+		$uri = GeneralUtility::getFileAbsFileName($uri);
55
+		$uri = substr($uri, strlen(Environment::getPublicPath() . '/'));
56
+		if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend() && $uri !== false) {
57
+			$uri = '../' . $uri;
58
+		}
59
+		return $uri;
60
+	}
61 61
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Be/RequireJsViewHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $pageRenderer->addJsInlineCode('vidi-inline', $content);
34 34
 
35 35
         $publicResourcesPath = PathUtility::getPublicResourceWebPath('EXT:vidi/Resources/Public/');
36
-        $configuration['paths']['Fab/Vidi'] = $publicResourcesPath . 'JavaScript';
36
+        $configuration['paths']['Fab/Vidi'] = $publicResourcesPath.'JavaScript';
37 37
         $pageRenderer->addRequireJsConfiguration($configuration);
38 38
         $pageRenderer->loadRequireJsModule('Fab/Vidi/Vidi/Main');
39 39
     }
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,21 +19,21 @@
 block discarded – undo
19 19
  */
20 20
 class RequireJsViewHelper extends AbstractBackendViewHelper
21 21
 {
22
-    /**
23
-     * Load RequireJS code.
24
-     *
25
-     * @return void
26
-     */
27
-    public function render()
28
-    {
29
-        $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
22
+	/**
23
+	 * Load RequireJS code.
24
+	 *
25
+	 * @return void
26
+	 */
27
+	public function render()
28
+	{
29
+		$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
30 30
 
31
-        $content = $this->renderChildren();
32
-        $pageRenderer->addJsInlineCode('vidi-inline', $content);
31
+		$content = $this->renderChildren();
32
+		$pageRenderer->addJsInlineCode('vidi-inline', $content);
33 33
 
34
-        $publicResourcesPath = PathUtility::getPublicResourceWebPath('EXT:vidi/Resources/Public/');
35
-        $configuration['paths']['Fab/Vidi'] = $publicResourcesPath . 'JavaScript';
36
-        $pageRenderer->addRequireJsConfiguration($configuration);
37
-        $pageRenderer->loadRequireJsModule('Fab/Vidi/Vidi/Main');
38
-    }
34
+		$publicResourcesPath = PathUtility::getPublicResourceWebPath('EXT:vidi/Resources/Public/');
35
+		$configuration['paths']['Fab/Vidi'] = $publicResourcesPath . 'JavaScript';
36
+		$pageRenderer->addRequireJsConfiguration($configuration);
37
+		$pageRenderer->loadRequireJsModule('Fab/Vidi/Vidi/Main');
38
+	}
39 39
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Result/ToXlsViewHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $response->withHeader('Expires', '0');
104 104
         $response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');
105 105
         $response->withHeader('Content-Type', 'application/vnd.ms-excel');
106
-        $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"');
106
+        $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"');
107 107
         $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath));
108 108
         $response->withHeader('Content-Description', 'File Transfer');
109 109
         $response->withHeader('Content-Transfer-Encoding', 'binary');
Please login to merge, or discard this patch.
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -18,91 +18,91 @@
 block discarded – undo
18 18
  */
19 19
 class ToXlsViewHelper extends AbstractToFormatViewHelper
20 20
 {
21
-    /**
22
-     * Render a XLS export request.
23
-     *
24
-     */
25
-    public function render()
26
-    {
27
-        $objects = $this->templateVariableContainer->get('objects');
28
-
29
-        // Make sure we have something to process...
30
-        if (!empty($objects)) {
31
-            // Initialization step.
32
-            $this->initializeEnvironment($objects);
33
-            $this->exportFileNameAndPath .= '.xls'; // add extension to the file.
34
-
35
-            // Write the exported data to a CSV file.
36
-            $this->writeXlsFile($objects);
37
-
38
-            // We must generate a zip archive since there are files included.
39
-            if ($this->hasCollectedFiles()) {
40
-                $this->writeZipFile();
41
-                $this->sendZipHttpHeaders();
42
-
43
-                readfile($this->zipFileNameAndPath);
44
-            } else {
45
-                $this->sendXlsHttpHeaders();
46
-                readfile($this->exportFileNameAndPath);
47
-            }
48
-
49
-            GeneralUtility::rmdir($this->temporaryDirectory, true);
50
-        }
51
-    }
52
-
53
-    /**
54
-     * Write the CSV file to a temporary location.
55
-     *
56
-     * @param array $objects
57
-     * @return void
58
-     */
59
-    protected function writeXlsFile(array $objects)
60
-    {
61
-        /** @var SpreadSheetService $spreadSheet */
62
-        $spreadSheet = GeneralUtility::makeInstance(SpreadSheetService::class);
63
-
64
-        // Handle object header, get the first object and get the list of fields.
65
-        /** @var Content $object */
66
-        $object = reset($objects);
67
-        $spreadSheet->addRow($object->toFields());
68
-
69
-        $this->checkWhetherObjectMayIncludeFiles($object);
70
-
71
-        foreach ($objects as $object) {
72
-            if ($this->hasFileFields()) {
73
-                $this->collectFiles($object);
74
-            }
75
-
76
-            // Make sure we have a flat array of values for the CSV purpose.
77
-            $flattenValues = [];
78
-            foreach ($object->toValues() as $fieldName => $value) {
79
-                if (is_array($value)) {
80
-                    $flattenValues[$fieldName] = implode(', ', $value);
81
-                } else {
82
-                    $flattenValues[$fieldName] = $value;
83
-                }
84
-            }
85
-
86
-            $spreadSheet->addRow($flattenValues);
87
-        }
88
-
89
-        file_put_contents($this->exportFileNameAndPath, $spreadSheet->toString());
90
-    }
91
-
92
-    /**
93
-     * @return void
94
-     */
95
-    protected function sendXlsHttpHeaders()
96
-    {
97
-        /** @var Response $response */
98
-        $response = $this->templateVariableContainer->get('response');
99
-        $response->withHeader('Pragma', 'public');
100
-        $response->withHeader('Expires', '0');
101
-        $response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');
102
-        $response->withHeader('Content-Type', 'application/vnd.ms-excel');
103
-        $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"');
104
-        $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath));
105
-        $response->withHeader('Content-Description', 'File Transfer');
106
-        $response->withHeader('Content-Transfer-Encoding', 'binary');
107
-    }
21
+	/**
22
+	 * Render a XLS export request.
23
+	 *
24
+	 */
25
+	public function render()
26
+	{
27
+		$objects = $this->templateVariableContainer->get('objects');
28
+
29
+		// Make sure we have something to process...
30
+		if (!empty($objects)) {
31
+			// Initialization step.
32
+			$this->initializeEnvironment($objects);
33
+			$this->exportFileNameAndPath .= '.xls'; // add extension to the file.
34
+
35
+			// Write the exported data to a CSV file.
36
+			$this->writeXlsFile($objects);
37
+
38
+			// We must generate a zip archive since there are files included.
39
+			if ($this->hasCollectedFiles()) {
40
+				$this->writeZipFile();
41
+				$this->sendZipHttpHeaders();
42
+
43
+				readfile($this->zipFileNameAndPath);
44
+			} else {
45
+				$this->sendXlsHttpHeaders();
46
+				readfile($this->exportFileNameAndPath);
47
+			}
48
+
49
+			GeneralUtility::rmdir($this->temporaryDirectory, true);
50
+		}
51
+	}
52
+
53
+	/**
54
+	 * Write the CSV file to a temporary location.
55
+	 *
56
+	 * @param array $objects
57
+	 * @return void
58
+	 */
59
+	protected function writeXlsFile(array $objects)
60
+	{
61
+		/** @var SpreadSheetService $spreadSheet */
62
+		$spreadSheet = GeneralUtility::makeInstance(SpreadSheetService::class);
63
+
64
+		// Handle object header, get the first object and get the list of fields.
65
+		/** @var Content $object */
66
+		$object = reset($objects);
67
+		$spreadSheet->addRow($object->toFields());
68
+
69
+		$this->checkWhetherObjectMayIncludeFiles($object);
70
+
71
+		foreach ($objects as $object) {
72
+			if ($this->hasFileFields()) {
73
+				$this->collectFiles($object);
74
+			}
75
+
76
+			// Make sure we have a flat array of values for the CSV purpose.
77
+			$flattenValues = [];
78
+			foreach ($object->toValues() as $fieldName => $value) {
79
+				if (is_array($value)) {
80
+					$flattenValues[$fieldName] = implode(', ', $value);
81
+				} else {
82
+					$flattenValues[$fieldName] = $value;
83
+				}
84
+			}
85
+
86
+			$spreadSheet->addRow($flattenValues);
87
+		}
88
+
89
+		file_put_contents($this->exportFileNameAndPath, $spreadSheet->toString());
90
+	}
91
+
92
+	/**
93
+	 * @return void
94
+	 */
95
+	protected function sendXlsHttpHeaders()
96
+	{
97
+		/** @var Response $response */
98
+		$response = $this->templateVariableContainer->get('response');
99
+		$response->withHeader('Pragma', 'public');
100
+		$response->withHeader('Expires', '0');
101
+		$response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');
102
+		$response->withHeader('Content-Type', 'application/vnd.ms-excel');
103
+		$response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"');
104
+		$response->withHeader('Content-Length', filesize($this->exportFileNameAndPath));
105
+		$response->withHeader('Content-Description', 'File Transfer');
106
+		$response->withHeader('Content-Transfer-Encoding', 'binary');
107
+	}
108 108
 }
Please login to merge, or discard this patch.
Tests/Functional/Grid/RelationRendererTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 use Fab\Vidi\Domain\Model\Content;
18 18
 use Fab\Vidi\Tests\Functional\AbstractFunctionalTestCase;
19 19
 
20
-require_once dirname(dirname(__FILE__)) . '/AbstractFunctionalTestCase.php';
20
+require_once dirname(dirname(__FILE__)).'/AbstractFunctionalTestCase.php';
21 21
 
22 22
 /**
23 23
  * Test case for class \Fab\Vidi\Grid\CategoryRenderer.
Please login to merge, or discard this patch.
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -25,42 +25,42 @@
 block discarded – undo
25 25
  */
26 26
 class RelationRendererTest extends AbstractFunctionalTestCase
27 27
 {
28
-    /**
29
-     * @var RelationRenderer
30
-     */
31
-    private $fixture;
28
+	/**
29
+	 * @var RelationRenderer
30
+	 */
31
+	private $fixture;
32 32
 
33
-    /**
34
-     * @var string
35
-     */
36
-    private $dataType = 'fe_users';
33
+	/**
34
+	 * @var string
35
+	 */
36
+	private $dataType = 'fe_users';
37 37
 
38
-    /**
39
-     * @var string
40
-     */
41
-    private $moduleCode = 'user_VidiFeUsersM1';
38
+	/**
39
+	 * @var string
40
+	 */
41
+	private $moduleCode = 'user_VidiFeUsersM1';
42 42
 
43
-    public function setUp()
44
-    {
45
-        parent::setUp();
46
-        $moduleLoader = new ModuleLoader($this->dataType);
47
-        $moduleLoader->register();
48
-        $GLOBALS['_GET']['M'] = $this->moduleCode;
49
-        $this->fixture = new RelationRenderer();
50
-    }
43
+	public function setUp()
44
+	{
45
+		parent::setUp();
46
+		$moduleLoader = new ModuleLoader($this->dataType);
47
+		$moduleLoader->register();
48
+		$GLOBALS['_GET']['M'] = $this->moduleCode;
49
+		$this->fixture = new RelationRenderer();
50
+	}
51 51
 
52
-    public function tearDown()
53
-    {
54
-        unset($this->fixture, $GLOBALS['_GET']['M']);
55
-    }
52
+	public function tearDown()
53
+	{
54
+		unset($this->fixture, $GLOBALS['_GET']['M']);
55
+	}
56 56
 
57
-    /**
58
-     * @test
59
-     */
60
-    public function renderAssetWithNoCategoryReturnsEmpty()
61
-    {
62
-        $content = new Content($this->dataType);
63
-        $this->markTestIncomplete(); # TCA must be faked
64
-        #$actual = $this->fixture->setObject($content)->render();
65
-    }
57
+	/**
58
+	 * @test
59
+	 */
60
+	public function renderAssetWithNoCategoryReturnsEmpty()
61
+	{
62
+		$content = new Content($this->dataType);
63
+		$this->markTestIncomplete(); # TCA must be faked
64
+		#$actual = $this->fixture->setObject($content)->render();
65
+	}
66 66
 }
Please login to merge, or discard this patch.
Configuration/Extbase/Persistence/Classes.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 use Fab\Vidi\Domain\Model\Selection;
5 5
 
6 6
 return [
7
-    Selection::class => [
8
-        'tableName' => 'tx_vidi_selection',
9
-    ],
7
+	Selection::class => [
8
+		'tableName' => 'tx_vidi_selection',
9
+	],
10 10
 ];
Please login to merge, or discard this patch.
Configuration/Commands.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * example: bin/typo3 vidi:analyseRelations
6 6
  */
7 7
 return [
8
-    'vidi:analyseRelations' => [
9
-        'class' => VidiCommandController::class
10
-    ],
8
+	'vidi:analyseRelations' => [
9
+		'class' => VidiCommandController::class
10
+	],
11 11
 ];
Please login to merge, or discard this patch.