Completed
Push — master ( b0b1c6...4fec92 )
by Fabien
54:17
created
Classes/View/Button/DeleteButton.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -20,72 +20,72 @@
 block discarded – undo
20 20
  */
21 21
 class DeleteButton extends AbstractComponentView
22 22
 {
23
-    /**
24
-     * Renders a "delete" button to be placed in the grid.
25
-     *
26
-     * @param Content $object
27
-     * @return string
28
-     * @throws \RuntimeException
29
-     * @throws \InvalidArgumentException
30
-     */
31
-    public function render(Content $object = null)
32
-    {
33
-        $button = '';
34
-        $file = $this->getFileConverter()->convert($object);
23
+	/**
24
+	 * Renders a "delete" button to be placed in the grid.
25
+	 *
26
+	 * @param Content $object
27
+	 * @return string
28
+	 * @throws \RuntimeException
29
+	 * @throws \InvalidArgumentException
30
+	 */
31
+	public function render(Content $object = null)
32
+	{
33
+		$button = '';
34
+		$file = $this->getFileConverter()->convert($object);
35 35
 
36
-        // Only display the delete icon if the file has no reference.
37
-        if ($this->getFileReferenceService()->countTotalReferences($object->getUid()) === 0 && $file->checkActionPermission('write')) {
38
-            $button = $this->makeLinkButton()
39
-                ->setHref($this->getDeleteUri($object))
40
-                ->setDataAttributes([
41
-                    'uid' => $object->getUid(),
42
-                    'toggle' => 'tooltip',
43
-                    'label' => $file->getProperty('title'),
44
-                ])
45
-                ->setClasses('btn-delete')
46
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:delete'))
47
-                ->setIcon($this->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL))
48
-                ->render();
49
-        }
36
+		// Only display the delete icon if the file has no reference.
37
+		if ($this->getFileReferenceService()->countTotalReferences($object->getUid()) === 0 && $file->checkActionPermission('write')) {
38
+			$button = $this->makeLinkButton()
39
+				->setHref($this->getDeleteUri($object))
40
+				->setDataAttributes([
41
+					'uid' => $object->getUid(),
42
+					'toggle' => 'tooltip',
43
+					'label' => $file->getProperty('title'),
44
+				])
45
+				->setClasses('btn-delete')
46
+				->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:delete'))
47
+				->setIcon($this->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL))
48
+				->render();
49
+		}
50 50
 
51
-        return $button;
52
-    }
51
+		return $button;
52
+	}
53 53
 
54
-    /**
55
-     * @param Content $object
56
-     * @return string
57
-     * @throws \InvalidArgumentException
58
-     */
59
-    protected function getDeleteUri(Content $object)
60
-    {
61
-        $additionalParameters = array(
62
-            $this->getModuleLoader()->getParameterPrefix() => array(
63
-                'controller' => 'Content',
64
-                'action' => 'delete',
65
-                'format' => 'json',
66
-                'matches' => array(
67
-                    'uid' => $object->getUid(),
68
-                ),
69
-            ),
70
-        );
71
-        return $this->getModuleLoader()->getModuleUrl($additionalParameters);
72
-    }
54
+	/**
55
+	 * @param Content $object
56
+	 * @return string
57
+	 * @throws \InvalidArgumentException
58
+	 */
59
+	protected function getDeleteUri(Content $object)
60
+	{
61
+		$additionalParameters = array(
62
+			$this->getModuleLoader()->getParameterPrefix() => array(
63
+				'controller' => 'Content',
64
+				'action' => 'delete',
65
+				'format' => 'json',
66
+				'matches' => array(
67
+					'uid' => $object->getUid(),
68
+				),
69
+			),
70
+		);
71
+		return $this->getModuleLoader()->getModuleUrl($additionalParameters);
72
+	}
73 73
 
74
-    /**
75
-     * @return FileReferenceService|object
76
-     * @throws \InvalidArgumentException
77
-     */
78
-    protected function getFileReferenceService()
79
-    {
80
-        return GeneralUtility::makeInstance(FileReferenceService::class);
81
-    }
74
+	/**
75
+	 * @return FileReferenceService|object
76
+	 * @throws \InvalidArgumentException
77
+	 */
78
+	protected function getFileReferenceService()
79
+	{
80
+		return GeneralUtility::makeInstance(FileReferenceService::class);
81
+	}
82 82
 
83
-    /**
84
-     * @return ContentToFileConverter|object
85
-     * @throws \InvalidArgumentException
86
-     */
87
-    protected function getFileConverter()
88
-    {
89
-        return GeneralUtility::makeInstance(ContentToFileConverter::class);
90
-    }
83
+	/**
84
+	 * @return ContentToFileConverter|object
85
+	 * @throws \InvalidArgumentException
86
+	 */
87
+	protected function getFileConverter()
88
+	{
89
+		return GeneralUtility::makeInstance(ContentToFileConverter::class);
90
+	}
91 91
 }
Please login to merge, or discard this patch.
Classes/View/Button/UploadButton.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
  */
19 19
 class UploadButton extends AbstractComponentView
20 20
 {
21
-    /**
22
-     * Renders a button for uploading assets.
23
-     *
24
-     * @return string
25
-     */
26
-    public function render()
27
-    {
28
-        /** @var $fileUpload \Fab\Media\Form\FileUpload */
29
-        $fileUpload = GeneralUtility::makeInstance(FileUpload::class);
30
-        return $fileUpload->setPrefix(MediaModule::getParameterPrefix())->render();
31
-    }
21
+	/**
22
+	 * Renders a button for uploading assets.
23
+	 *
24
+	 * @return string
25
+	 */
26
+	public function render()
27
+	{
28
+		/** @var $fileUpload \Fab\Media\Form\FileUpload */
29
+		$fileUpload = GeneralUtility::makeInstance(FileUpload::class);
30
+		return $fileUpload->setPrefix(MediaModule::getParameterPrefix())->render();
31
+	}
32 32
 }
Please login to merge, or discard this patch.
Classes/View/Button/DownloadButton.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -20,43 +20,43 @@
 block discarded – undo
20 20
  */
21 21
 class DownloadButton extends AbstractComponentView
22 22
 {
23
-    /**
24
-     * Renders a "download" button to be placed in the grid.
25
-     *
26
-     * @param Content $object
27
-     * @return string
28
-     * @throws \InvalidArgumentException
29
-     */
30
-    public function render(Content $object = null)
31
-    {
32
-        $button = $this->makeLinkButton()
33
-            ->setHref($this->getDownloadUri($object))
34
-            ->setDataAttributes([
35
-                'uid' => $object->getUid(),
36
-                'toggle' => 'tooltip',
37
-            ])
38
-            ->setClasses('btn-download')
39
-            ->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:download'))
40
-            ->setIcon($this->getIconFactory()->getIcon('actions-system-extension-download', Icon::SIZE_SMALL))
41
-            ->render();
23
+	/**
24
+	 * Renders a "download" button to be placed in the grid.
25
+	 *
26
+	 * @param Content $object
27
+	 * @return string
28
+	 * @throws \InvalidArgumentException
29
+	 */
30
+	public function render(Content $object = null)
31
+	{
32
+		$button = $this->makeLinkButton()
33
+			->setHref($this->getDownloadUri($object))
34
+			->setDataAttributes([
35
+				'uid' => $object->getUid(),
36
+				'toggle' => 'tooltip',
37
+			])
38
+			->setClasses('btn-download')
39
+			->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:download'))
40
+			->setIcon($this->getIconFactory()->getIcon('actions-system-extension-download', Icon::SIZE_SMALL))
41
+			->render();
42 42
 
43
-        return $button;
44
-    }
43
+		return $button;
44
+	}
45 45
 
46
-    /**
47
-     * @param Content $object
48
-     * @return string
49
-     */
50
-    protected function getDownloadUri(Content $object)
51
-    {
52
-        $urlParameters = [
53
-            MediaModule::getParameterPrefix() => [
54
-                'controller' => 'Asset',
55
-                'action' => 'download',
56
-                'forceDownload' => true,
57
-                'file' => $object->getUid(),
58
-            ],
59
-        ];
60
-        return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
-    }
46
+	/**
47
+	 * @param Content $object
48
+	 * @return string
49
+	 */
50
+	protected function getDownloadUri(Content $object)
51
+	{
52
+		$urlParameters = [
53
+			MediaModule::getParameterPrefix() => [
54
+				'controller' => 'Asset',
55
+				'action' => 'download',
56
+				'forceDownload' => true,
57
+				'file' => $object->getUid(),
58
+			],
59
+		];
60
+		return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
+	}
62 62
 }
Please login to merge, or discard this patch.
Classes/View/Button/EditButton.php 1 patch
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -22,79 +22,79 @@
 block discarded – undo
22 22
  */
23 23
 class EditButton extends AbstractComponentView
24 24
 {
25
-    /**
26
-     * Renders a "edit" button to be placed in the grid.
27
-     *
28
-     * @param Content $object
29
-     * @return string
30
-     */
31
-    public function render(Content $object = null)
32
-    {
33
-        $file = $this->getFileConverter()->convert($object);
34
-        $metadataProperties = $file->getMetaData()->get();
25
+	/**
26
+	 * Renders a "edit" button to be placed in the grid.
27
+	 *
28
+	 * @param Content $object
29
+	 * @return string
30
+	 */
31
+	public function render(Content $object = null)
32
+	{
33
+		$file = $this->getFileConverter()->convert($object);
34
+		$metadataProperties = $file->getMetaData()->get();
35 35
 
36
-        $button = '';
37
-        if ($file->checkActionPermission('write')) {
38
-            $button = $this->makeLinkButton()
39
-                ->setHref($this->getUri($file))
40
-                ->setDataAttributes([
41
-                    'uid' => $metadataProperties['uid'],
42
-                    'toggle' => 'tooltip',
43
-                ])
44
-                ->setClasses('btn-edit')
45
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:edit_metadata'))
46
-                ->setIcon($this->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL))
47
-                ->render();
48
-        }
36
+		$button = '';
37
+		if ($file->checkActionPermission('write')) {
38
+			$button = $this->makeLinkButton()
39
+				->setHref($this->getUri($file))
40
+				->setDataAttributes([
41
+					'uid' => $metadataProperties['uid'],
42
+					'toggle' => 'tooltip',
43
+				])
44
+				->setClasses('btn-edit')
45
+				->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:edit_metadata'))
46
+				->setIcon($this->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL))
47
+				->render();
48
+		}
49 49
 
50
-        return $button;
51
-    }
50
+		return $button;
51
+	}
52 52
 
53
-    /**
54
-     * @param File $file
55
-     * @return string
56
-     */
57
-    protected function getUri(File $file)
58
-    {
59
-        $metadataProperties = $file->getMetaData()->get();
53
+	/**
54
+	 * @param File $file
55
+	 * @return string
56
+	 */
57
+	protected function getUri(File $file)
58
+	{
59
+		$metadataProperties = $file->getMetaData()->get();
60 60
 
61
-        $parameterName = sprintf('edit[sys_file_metadata][%s]', $metadataProperties['uid']);
62
-        $uri = BackendUtility::getModuleUrl(
63
-            'record_edit',
64
-            array(
65
-                $parameterName => 'edit',
66
-                'returnUrl' => BackendUtility::getModuleUrl(GeneralUtility::_GP('route'), $this->getAdditionalParameters())
67
-            )
68
-        );
69
-        return $uri;
70
-    }
61
+		$parameterName = sprintf('edit[sys_file_metadata][%s]', $metadataProperties['uid']);
62
+		$uri = BackendUtility::getModuleUrl(
63
+			'record_edit',
64
+			array(
65
+				$parameterName => 'edit',
66
+				'returnUrl' => BackendUtility::getModuleUrl(GeneralUtility::_GP('route'), $this->getAdditionalParameters())
67
+			)
68
+		);
69
+		return $uri;
70
+	}
71 71
 
72
-    /**
73
-     * @return array
74
-     */
75
-    protected function getAdditionalParameters()
76
-    {
77
-        $additionalParameters = [];
78
-        if (GeneralUtility::_GP('id')) {
79
-            $additionalParameters['id'] = urldecode(GeneralUtility::_GP('id'));
80
-        }
72
+	/**
73
+	 * @return array
74
+	 */
75
+	protected function getAdditionalParameters()
76
+	{
77
+		$additionalParameters = [];
78
+		if (GeneralUtility::_GP('id')) {
79
+			$additionalParameters['id'] = urldecode(GeneralUtility::_GP('id'));
80
+		}
81 81
 
82
-        $vidiParameters = GeneralUtility::_GP(VidiModule::PARAMETER_PREFIX);
83
-        if (is_array($vidiParameters)) {
84
-            $whitelistedParameters = array_intersect_key($vidiParameters, ['plugins' => true, 'matches' => true]);
85
-            if (count($whitelistedParameters) === 2) {
86
-                $additionalParameters[VidiModule::PARAMETER_PREFIX] = $whitelistedParameters;
87
-            }
88
-        }
82
+		$vidiParameters = GeneralUtility::_GP(VidiModule::PARAMETER_PREFIX);
83
+		if (is_array($vidiParameters)) {
84
+			$whitelistedParameters = array_intersect_key($vidiParameters, ['plugins' => true, 'matches' => true]);
85
+			if (count($whitelistedParameters) === 2) {
86
+				$additionalParameters[VidiModule::PARAMETER_PREFIX] = $whitelistedParameters;
87
+			}
88
+		}
89 89
 
90
-        return $additionalParameters;
91
-    }
90
+		return $additionalParameters;
91
+	}
92 92
 
93
-    /**
94
-     * @return ContentToFileConverter|object
95
-     */
96
-    protected function getFileConverter()
97
-    {
98
-        return GeneralUtility::makeInstance(ContentToFileConverter::class);
99
-    }
93
+	/**
94
+	 * @return ContentToFileConverter|object
95
+	 */
96
+	protected function getFileConverter()
97
+	{
98
+		return GeneralUtility::makeInstance(ContentToFileConverter::class);
99
+	}
100 100
 }
Please login to merge, or discard this patch.
Classes/View/Button/LinkCreatorButton.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -20,43 +20,43 @@
 block discarded – undo
20 20
  */
21 21
 class LinkCreatorButton extends AbstractComponentView
22 22
 {
23
-    /**
24
-     * Renders a "link-creator" button to be placed in the grid.
25
-     *
26
-     * @param Content $object
27
-     * @return string
28
-     */
29
-    public function render(Content $object = null)
30
-    {
31
-        $button = '';
32
-        if ($this->getModuleLoader()->hasPlugin('linkCreator')) {
33
-            $button = $this->makeLinkButton()
34
-                ->setHref($this->getLinkCreatorUri($object))
35
-                ->setDataAttributes([
36
-                    'uid' => $object->getUid(),
37
-                    'toggle' => 'tooltip',
38
-                ])
39
-                ->setClasses('btn-linkCreator')
40
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:create_link'))
41
-                ->setIcon($this->getIconFactory()->getIcon('apps-pagetree-page-shortcut-external-root', Icon::SIZE_SMALL))
42
-                ->render();
43
-        }
44
-        return $button;
45
-    }
23
+	/**
24
+	 * Renders a "link-creator" button to be placed in the grid.
25
+	 *
26
+	 * @param Content $object
27
+	 * @return string
28
+	 */
29
+	public function render(Content $object = null)
30
+	{
31
+		$button = '';
32
+		if ($this->getModuleLoader()->hasPlugin('linkCreator')) {
33
+			$button = $this->makeLinkButton()
34
+				->setHref($this->getLinkCreatorUri($object))
35
+				->setDataAttributes([
36
+					'uid' => $object->getUid(),
37
+					'toggle' => 'tooltip',
38
+				])
39
+				->setClasses('btn-linkCreator')
40
+				->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:create_link'))
41
+				->setIcon($this->getIconFactory()->getIcon('apps-pagetree-page-shortcut-external-root', Icon::SIZE_SMALL))
42
+				->render();
43
+		}
44
+		return $button;
45
+	}
46 46
 
47
-    /**
48
-     * @param Content $object
49
-     * @return string
50
-     */
51
-    protected function getLinkCreatorUri(Content $object)
52
-    {
53
-        $urlParameters = array(
54
-            MediaModule::getParameterPrefix() => array(
55
-                'controller' => 'LinkCreator',
56
-                'action' => 'show',
57
-                'file' => $object->getUid(),
58
-            ),
59
-        );
60
-        return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
-    }
47
+	/**
48
+	 * @param Content $object
49
+	 * @return string
50
+	 */
51
+	protected function getLinkCreatorUri(Content $object)
52
+	{
53
+		$urlParameters = array(
54
+			MediaModule::getParameterPrefix() => array(
55
+				'controller' => 'LinkCreator',
56
+				'action' => 'show',
57
+				'file' => $object->getUid(),
58
+			),
59
+		);
60
+		return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
+	}
62 62
 }
Please login to merge, or discard this patch.
Classes/View/Button/FilePickerButton.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -20,43 +20,43 @@
 block discarded – undo
20 20
  */
21 21
 class FilePickerButton extends AbstractComponentView
22 22
 {
23
-    /**
24
-     * Renders a "file-picker" button to be placed in the grid.
25
-     *
26
-     * @param Content $object
27
-     * @return string
28
-     */
29
-    public function render(Content $object = null)
30
-    {
31
-        $button = '';
32
-        if ($this->getModuleLoader()->hasPlugin('filePicker')) {
33
-            $button = $this->makeLinkButton()
34
-                ->setHref($this->getFilePickerUri($object))
35
-                ->setDataAttributes([
36
-                    'uid' => $object->getUid(),
37
-                    'toggle' => 'tooltip',
38
-                ])
39
-                ->setClasses('btn-filePicker')
40
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:edit_image'))
41
-                ->setIcon($this->getIconFactory()->getIcon('extensions-media-image-export', Icon::SIZE_SMALL))
42
-                ->render();
43
-        }
44
-        return $button;
45
-    }
23
+	/**
24
+	 * Renders a "file-picker" button to be placed in the grid.
25
+	 *
26
+	 * @param Content $object
27
+	 * @return string
28
+	 */
29
+	public function render(Content $object = null)
30
+	{
31
+		$button = '';
32
+		if ($this->getModuleLoader()->hasPlugin('filePicker')) {
33
+			$button = $this->makeLinkButton()
34
+				->setHref($this->getFilePickerUri($object))
35
+				->setDataAttributes([
36
+					'uid' => $object->getUid(),
37
+					'toggle' => 'tooltip',
38
+				])
39
+				->setClasses('btn-filePicker')
40
+				->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:edit_image'))
41
+				->setIcon($this->getIconFactory()->getIcon('extensions-media-image-export', Icon::SIZE_SMALL))
42
+				->render();
43
+		}
44
+		return $button;
45
+	}
46 46
 
47
-    /**
48
-     * @param Content $object
49
-     * @return string
50
-     */
51
-    protected function getFilePickerUri(Content $object)
52
-    {
53
-        $urlParameters = array(
54
-            MediaModule::getParameterPrefix() => array(
55
-                'controller' => 'Asset',
56
-                'action' => 'download',
57
-                'file' => $object->getUid(),
58
-            ),
59
-        );
60
-        return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
-    }
47
+	/**
48
+	 * @param Content $object
49
+	 * @return string
50
+	 */
51
+	protected function getFilePickerUri(Content $object)
52
+	{
53
+		$urlParameters = array(
54
+			MediaModule::getParameterPrefix() => array(
55
+				'controller' => 'Asset',
56
+				'action' => 'download',
57
+				'file' => $object->getUid(),
58
+			),
59
+		);
60
+		return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
+	}
62 62
 }
Please login to merge, or discard this patch.
Classes/View/Button/ImageEditorButton.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -20,43 +20,43 @@
 block discarded – undo
20 20
  */
21 21
 class ImageEditorButton extends AbstractComponentView
22 22
 {
23
-    /**
24
-     * Renders a "image-editor" button to be placed in the grid.
25
-     *
26
-     * @param Content $object
27
-     * @return string
28
-     */
29
-    public function render(Content $object = null)
30
-    {
31
-        $button = '';
32
-        if ($this->getModuleLoader()->hasPlugin('imageEditor')) {
33
-            $button = $this->makeLinkButton()
34
-                ->setHref($this->getImageEditorUri($object))
35
-                ->setDataAttributes([
36
-                    'uid' => $object->getUid(),
37
-                    'toggle' => 'tooltip',
38
-                ])
39
-                ->setClasses('btn-imageEditor')
40
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:edit_image'))
41
-                ->setIcon($this->getIconFactory()->getIcon('extensions-media-image-edit', Icon::SIZE_SMALL))
42
-                ->render();
43
-        }
44
-        return $button;
45
-    }
23
+	/**
24
+	 * Renders a "image-editor" button to be placed in the grid.
25
+	 *
26
+	 * @param Content $object
27
+	 * @return string
28
+	 */
29
+	public function render(Content $object = null)
30
+	{
31
+		$button = '';
32
+		if ($this->getModuleLoader()->hasPlugin('imageEditor')) {
33
+			$button = $this->makeLinkButton()
34
+				->setHref($this->getImageEditorUri($object))
35
+				->setDataAttributes([
36
+					'uid' => $object->getUid(),
37
+					'toggle' => 'tooltip',
38
+				])
39
+				->setClasses('btn-imageEditor')
40
+				->setTitle($this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:edit_image'))
41
+				->setIcon($this->getIconFactory()->getIcon('extensions-media-image-edit', Icon::SIZE_SMALL))
42
+				->render();
43
+		}
44
+		return $button;
45
+	}
46 46
 
47
-    /**
48
-     * @param Content $object
49
-     * @return string
50
-     */
51
-    protected function getImageEditorUri(Content $object)
52
-    {
53
-        $urlParameters = array(
54
-            MediaModule::getParameterPrefix() => array(
55
-                'controller' => 'ImageEditor',
56
-                'action' => 'show',
57
-                'file' => $object->getUid(),
58
-            ),
59
-        );
60
-        return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
-    }
47
+	/**
48
+	 * @param Content $object
49
+	 * @return string
50
+	 */
51
+	protected function getImageEditorUri(Content $object)
52
+	{
53
+		$urlParameters = array(
54
+			MediaModule::getParameterPrefix() => array(
55
+				'controller' => 'ImageEditor',
56
+				'action' => 'show',
57
+				'file' => $object->getUid(),
58
+			),
59
+		);
60
+		return BackendUtility::getModuleUrl(MediaModule::getSignature(), $urlParameters);
61
+	}
62 62
 }
Please login to merge, or discard this patch.
Classes/View/InlineJavaScript.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class InlineJavaScript extends AbstractComponentView
19 19
 {
20
-    /**
21
-     * Renders a button for uploading assets.
22
-     *
23
-     * @return string
24
-     */
25
-    public function render()
26
-    {
27
-        $parameterPrefix = MediaModule::getParameterPrefix();
28
-        $output = "
20
+	/**
21
+	 * Renders a button for uploading assets.
22
+	 *
23
+	 * @return string
24
+	 */
25
+	public function render()
26
+	{
27
+		$parameterPrefix = MediaModule::getParameterPrefix();
28
+		$output = "
29 29
 <script>
30 30
 
31 31
 window.Media = window.Media || {};
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
 
34 34
 </script>";
35 35
 
36
-        return $output;
37
-    }
36
+		return $output;
37
+	}
38 38
 }
Please login to merge, or discard this patch.
Classes/View/Checkbox/RecursiveCheckbox.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -19,42 +19,42 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class RecursiveCheckbox extends AbstractComponentView
21 21
 {
22
-    /**
23
-     * Renders a checkbox for recursive file browsing.
24
-     *
25
-     * @return string
26
-     * @throws \InvalidArgumentException
27
-     */
28
-    public function render()
29
-    {
30
-        $output = '';
31
-        if ($this->isDisplayed()) {
32
-            $this->loadRequireJsCode();
33
-            $output = $this->renderRecursiveCheckbox();
34
-        }
22
+	/**
23
+	 * Renders a checkbox for recursive file browsing.
24
+	 *
25
+	 * @return string
26
+	 * @throws \InvalidArgumentException
27
+	 */
28
+	public function render()
29
+	{
30
+		$output = '';
31
+		if ($this->isDisplayed()) {
32
+			$this->loadRequireJsCode();
33
+			$output = $this->renderRecursiveCheckbox();
34
+		}
35 35
 
36
-        return $output;
37
-    }
36
+		return $output;
37
+	}
38 38
 
39
-    /**
40
-     * @return string
41
-     * @throws \InvalidArgumentException
42
-     */
43
-    protected function isDisplayed()
44
-    {
45
-        $isDisplayed = $this->getMediaModule()->hasFolderTree();
46
-        if ($this->getModuleLoader()->hasPlugin()) {
47
-            $isDisplayed = false;
48
-        }
49
-        return $isDisplayed;
50
-    }
39
+	/**
40
+	 * @return string
41
+	 * @throws \InvalidArgumentException
42
+	 */
43
+	protected function isDisplayed()
44
+	{
45
+		$isDisplayed = $this->getMediaModule()->hasFolderTree();
46
+		if ($this->getModuleLoader()->hasPlugin()) {
47
+			$isDisplayed = false;
48
+		}
49
+		return $isDisplayed;
50
+	}
51 51
 
52
-    /**
53
-     * @return string
54
-     */
55
-    protected function renderRecursiveCheckbox()
56
-    {
57
-        $template = '<form action="%s" id="form-checkbox-hasRecursiveSelection" method="get">
52
+	/**
53
+	 * @return string
54
+	 */
55
+	protected function renderRecursiveCheckbox()
56
+	{
57
+		$template = '<form action="%s" id="form-checkbox-hasRecursiveSelection" method="get">
58 58
 						<label>
59 59
 							<input type="checkbox"
60 60
 									name="%s[hasRecursiveSelection]"
@@ -65,34 +65,34 @@  discard block
 block discarded – undo
65 65
 						</label>
66 66
 					</form>';
67 67
 
68
-        return sprintf(
69
-            $template,
70
-            $this->getModuleLoader()->getModuleUrl(),
71
-            $this->getModuleLoader()->getParameterPrefix(),
72
-            $this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:browse_subfolders')
73
-        );
74
-    }
68
+		return sprintf(
69
+			$template,
70
+			$this->getModuleLoader()->getModuleUrl(),
71
+			$this->getModuleLoader()->getParameterPrefix(),
72
+			$this->getLanguageService()->sL('LLL:EXT:media/Resources/Private/Language/locallang.xlf:browse_subfolders')
73
+		);
74
+	}
75 75
 
76
-    /**
77
-     * @return void
78
-     * @throws \InvalidArgumentException
79
-     */
80
-    protected function loadRequireJsCode()
81
-    {
82
-        $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
76
+	/**
77
+	 * @return void
78
+	 * @throws \InvalidArgumentException
79
+	 */
80
+	protected function loadRequireJsCode()
81
+	{
82
+		$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
83 83
 
84
-        $configuration['paths']['Fab/Media'] = '../typo3conf/ext/media/Resources/Public/JavaScript';
85
-        $pageRenderer->addRequireJsConfiguration($configuration);
86
-        $pageRenderer->loadRequireJsModule('Fab/Media/BrowseRecursively');
87
-    }
84
+		$configuration['paths']['Fab/Media'] = '../typo3conf/ext/media/Resources/Public/JavaScript';
85
+		$pageRenderer->addRequireJsConfiguration($configuration);
86
+		$pageRenderer->loadRequireJsModule('Fab/Media/BrowseRecursively');
87
+	}
88 88
 
89 89
 
90
-    /**
91
-     * @return MediaModule|object
92
-     * @throws \InvalidArgumentException
93
-     */
94
-    protected function getMediaModule()
95
-    {
96
-        return GeneralUtility::makeInstance(MediaModule::class);
97
-    }
90
+	/**
91
+	 * @return MediaModule|object
92
+	 * @throws \InvalidArgumentException
93
+	 */
94
+	protected function getMediaModule()
95
+	{
96
+		return GeneralUtility::makeInstance(MediaModule::class);
97
+	}
98 98
 }
Please login to merge, or discard this patch.