Completed
Push — master ( 892a3f...068784 )
by Fabien
50:28
created
Classes/ViewHelpers/ModulePreferencesViewHelper.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -18,26 +18,26 @@
 block discarded – undo
18 18
 class ModulePreferencesViewHelper extends AbstractViewHelper
19 19
 {
20 20
 
21
-    /**
22
-     * @return void
23
-     */
24
-    public function initializeArguments()
25
-    {
26
-        $this->registerArgument('key', 'string', 'The module key', true);
27
-    }
21
+	/**
22
+	 * @return void
23
+	 */
24
+	public function initializeArguments()
25
+	{
26
+		$this->registerArgument('key', 'string', 'The module key', true);
27
+	}
28 28
 
29
-    /**
30
-     * Interface with the Module Loader
31
-     *
32
-     * @return string
33
-     */
34
-    public function render()
35
-    {
36
-        $getter = 'get' . ucfirst($this->arguments['key']);
29
+	/**
30
+	 * Interface with the Module Loader
31
+	 *
32
+	 * @return string
33
+	 */
34
+	public function render()
35
+	{
36
+		$getter = 'get' . ucfirst($this->arguments['key']);
37 37
 
38
-        /** @var ModulePreferences $modulePreferences */
39
-        $modulePreferences = GeneralUtility::makeInstance(ModulePreferences::class);
40
-        return $modulePreferences->$getter();
41
-    }
38
+		/** @var ModulePreferences $modulePreferences */
39
+		$modulePreferences = GeneralUtility::makeInstance(ModulePreferences::class);
40
+		return $modulePreferences->$getter();
41
+	}
42 42
 
43 43
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function render()
35 35
     {
36
-        $getter = 'get' . ucfirst($this->arguments['key']);
36
+        $getter = 'get'.ucfirst($this->arguments['key']);
37 37
 
38 38
         /** @var ModulePreferences $modulePreferences */
39 39
         $modulePreferences = GeneralUtility::makeInstance(ModulePreferences::class);
Please login to merge, or discard this patch.
Classes/ViewHelpers/GpViewHelper.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -18,42 +18,42 @@
 block discarded – undo
18 18
 class GpViewHelper extends AbstractViewHelper
19 19
 {
20 20
 
21
-    /**
22
-     * @return void
23
-     */
24
-    public function initializeArguments()
25
-    {
26
-        $this->registerArgument('argument', 'string', 'The argument name', true);
27
-        $this->registerArgument('encode', 'bool', 'Whether to encode the URL.', false, true);
28
-    }
29
-
30
-    /**
31
-     * Tells whether the argument exists or not.
32
-     *
33
-     * @return boolean
34
-     */
35
-    public function render()
36
-    {
37
-        $value = ''; // default value
38
-
39
-        // Merge parameters
40
-        $parameters = GeneralUtility::_GET();
41
-        $post = GeneralUtility::_POST();
42
-        ArrayUtility::mergeRecursiveWithOverrule($parameters, $post);
43
-
44
-        // Traverse argument parts and retrieve value.
45
-        $argumentParts = GeneralUtility::trimExplode('|', $this->arguments['argument']);
46
-        foreach ($argumentParts as $argumentPart) {
47
-            if (isset($parameters[$argumentPart])) {
48
-                $value = $parameters[$argumentPart];
49
-                $parameters = $value;
50
-            }
51
-        }
52
-
53
-        // Possible url encode.
54
-        if ($this->arguments['encode']) {
55
-            $value = urlencode($value);
56
-        }
57
-        return $value;
58
-    }
21
+	/**
22
+	 * @return void
23
+	 */
24
+	public function initializeArguments()
25
+	{
26
+		$this->registerArgument('argument', 'string', 'The argument name', true);
27
+		$this->registerArgument('encode', 'bool', 'Whether to encode the URL.', false, true);
28
+	}
29
+
30
+	/**
31
+	 * Tells whether the argument exists or not.
32
+	 *
33
+	 * @return boolean
34
+	 */
35
+	public function render()
36
+	{
37
+		$value = ''; // default value
38
+
39
+		// Merge parameters
40
+		$parameters = GeneralUtility::_GET();
41
+		$post = GeneralUtility::_POST();
42
+		ArrayUtility::mergeRecursiveWithOverrule($parameters, $post);
43
+
44
+		// Traverse argument parts and retrieve value.
45
+		$argumentParts = GeneralUtility::trimExplode('|', $this->arguments['argument']);
46
+		foreach ($argumentParts as $argumentPart) {
47
+			if (isset($parameters[$argumentPart])) {
48
+				$value = $parameters[$argumentPart];
49
+				$parameters = $value;
50
+			}
51
+		}
52
+
53
+		// Possible url encode.
54
+		if ($this->arguments['encode']) {
55
+			$value = urlencode($value);
56
+		}
57
+		return $value;
58
+	}
59 59
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/SpriteViewHelper.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,30 +19,30 @@
 block discarded – undo
19 19
 class SpriteViewHelper extends AbstractViewHelper
20 20
 {
21 21
 
22
-    /**
23
-     * @return void
24
-     */
25
-    public function initializeArguments()
26
-    {
27
-        $this->registerArgument('name', 'string', 'the file to include', true);
28
-    }
22
+	/**
23
+	 * @return void
24
+	 */
25
+	public function initializeArguments()
26
+	{
27
+		$this->registerArgument('name', 'string', 'the file to include', true);
28
+	}
29 29
 
30
-    /**
31
-     * Returns an icon using sprites
32
-     *
33
-     * @return string
34
-     */
35
-    public function render()
36
-    {
37
-        return $this->getIconFactory()->getIcon($this->arguments['name'], Icon::SIZE_SMALL);
38
-    }
30
+	/**
31
+	 * Returns an icon using sprites
32
+	 *
33
+	 * @return string
34
+	 */
35
+	public function render()
36
+	{
37
+		return $this->getIconFactory()->getIcon($this->arguments['name'], Icon::SIZE_SMALL);
38
+	}
39 39
 
40
-    /**
41
-     * @return IconFactory|object
42
-     */
43
-    protected function getIconFactory()
44
-    {
45
-        return GeneralUtility::makeInstance(IconFactory::class);
46
-    }
40
+	/**
41
+	 * @return IconFactory|object
42
+	 */
43
+	protected function getIconFactory()
44
+	{
45
+		return GeneralUtility::makeInstance(IconFactory::class);
46
+	}
47 47
 
48 48
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/IsRelatedToViewHelper.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -18,47 +18,47 @@
 block discarded – undo
18 18
 class IsRelatedToViewHelper extends AbstractViewHelper
19 19
 {
20 20
 
21
-    /**
22
-     * @return void
23
-     */
24
-    public function initializeArguments()
25
-    {
26
-        $this->registerArgument('relatedContent', Content::class, 'The related content', true);
27
-    }
21
+	/**
22
+	 * @return void
23
+	 */
24
+	public function initializeArguments()
25
+	{
26
+		$this->registerArgument('relatedContent', Content::class, 'The related content', true);
27
+	}
28 28
 
29
-    /**
30
-     * Tells whether a Content is related to another content.
31
-     * The $fieldName corresponds to the relational field name
32
-     * between the first content object and the second.
33
-     *
34
-     * @return boolean
35
-     */
36
-    public function render()
37
-    {
38
-        /** @var Content $relatedContent */
39
-        $relatedContent = $this->arguments['relatedContent'];
29
+	/**
30
+	 * Tells whether a Content is related to another content.
31
+	 * The $fieldName corresponds to the relational field name
32
+	 * between the first content object and the second.
33
+	 *
34
+	 * @return boolean
35
+	 */
36
+	public function render()
37
+	{
38
+		/** @var Content $relatedContent */
39
+		$relatedContent = $this->arguments['relatedContent'];
40 40
 
41
-        $isChecked = false;
41
+		$isChecked = false;
42 42
 
43
-        // Only computes whether the object is checked if one row is beeing edited.
44
-        $numberOfObjects = $this->templateVariableContainer->get('numberOfObjects');
45
-        if ($numberOfObjects === 1) {
43
+		// Only computes whether the object is checked if one row is beeing edited.
44
+		$numberOfObjects = $this->templateVariableContainer->get('numberOfObjects');
45
+		if ($numberOfObjects === 1) {
46 46
 
47
-            /** @var Content $content */
48
-            $content = $this->templateVariableContainer->get('content');
49
-            $fieldName = $this->templateVariableContainer->get('fieldName');
47
+			/** @var Content $content */
48
+			$content = $this->templateVariableContainer->get('content');
49
+			$fieldName = $this->templateVariableContainer->get('fieldName');
50 50
 
51
-            // Build an array of user group uids
52
-            $relatedContentsIdentifiers = [];
51
+			// Build an array of user group uids
52
+			$relatedContentsIdentifiers = [];
53 53
 
54
-            /** @var Content $contentObject */
55
-            foreach ($content[$fieldName] as $contentObject) {
56
-                $relatedContentsIdentifiers[] = $contentObject->getUid();
57
-            }
54
+			/** @var Content $contentObject */
55
+			foreach ($content[$fieldName] as $contentObject) {
56
+				$relatedContentsIdentifiers[] = $contentObject->getUid();
57
+			}
58 58
 
59
-            $isChecked = in_array($relatedContent->getUid(), $relatedContentsIdentifiers, true);
60
-        }
59
+			$isChecked = in_array($relatedContent->getUid(), $relatedContentsIdentifiers, true);
60
+		}
61 61
 
62
-        return $isChecked;
63
-    }
62
+		return $isChecked;
63
+	}
64 64
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Grid/Column/CanBeHiddenViewHelper.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -16,22 +16,22 @@
 block discarded – undo
16 16
  */
17 17
 class CanBeHiddenViewHelper extends AbstractViewHelper
18 18
 {
19
-    /**
20
-     * @return void
21
-     */
22
-    public function initializeArguments()
23
-    {
24
-        $this->registerArgument('name', 'string', 'The column name', true);
25
-    }
19
+	/**
20
+	 * @return void
21
+	 */
22
+	public function initializeArguments()
23
+	{
24
+		$this->registerArgument('name', 'string', 'The column name', true);
25
+	}
26 26
 
27
-    /**
28
-     * Returns whether the column can be hidden or not.
29
-     *
30
-     * @return boolean
31
-     */
32
-    public function render()
33
-    {
34
-        return Tca::grid()->canBeHidden($this->arguments['name']);
35
-    }
27
+	/**
28
+	 * Returns whether the column can be hidden or not.
29
+	 *
30
+	 * @return boolean
31
+	 */
32
+	public function render()
33
+	{
34
+		return Tca::grid()->canBeHidden($this->arguments['name']);
35
+	}
36 36
 
37 37
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Grid/Column/HeaderViewHelper.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -17,22 +17,22 @@
 block discarded – undo
17 17
 class HeaderViewHelper extends AbstractViewHelper
18 18
 {
19 19
 
20
-    /**
21
-     * @return void
22
-     */
23
-    public function initializeArguments()
24
-    {
25
-        $this->registerArgument('name', 'string', 'The column name', true);
26
-    }
20
+	/**
21
+	 * @return void
22
+	 */
23
+	public function initializeArguments()
24
+	{
25
+		$this->registerArgument('name', 'string', 'The column name', true);
26
+	}
27 27
 
28
-    /**
29
-     * Returns a possible column header.
30
-     *
31
-     * @return boolean
32
-     */
33
-    public function render()
34
-    {
35
-        return Tca::grid()->getHeader($this->arguments['name']);
36
-    }
28
+	/**
29
+	 * Returns a possible column header.
30
+	 *
31
+	 * @return boolean
32
+	 */
33
+	public function render()
34
+	{
35
+		return Tca::grid()->getHeader($this->arguments['name']);
36
+	}
37 37
 
38 38
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Grid/Column/IsVisibleViewHelper.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -17,22 +17,22 @@
 block discarded – undo
17 17
 class IsVisibleViewHelper extends AbstractViewHelper
18 18
 {
19 19
 
20
-    /**
21
-     * @return void
22
-     */
23
-    public function initializeArguments()
24
-    {
25
-        $this->registerArgument('name', 'string', 'The column name', true);
26
-    }
20
+	/**
21
+	 * @return void
22
+	 */
23
+	public function initializeArguments()
24
+	{
25
+		$this->registerArgument('name', 'string', 'The column name', true);
26
+	}
27 27
 
28
-    /**
29
-     * Returns whether the column is visible.
30
-     *
31
-     * @return bool
32
-     */
33
-    public function render()
34
-    {
35
-        return Tca::grid()->isVisible($this->arguments['name']);
36
-    }
28
+	/**
29
+	 * Returns whether the column is visible.
30
+	 *
31
+	 * @return bool
32
+	 */
33
+	public function render()
34
+	{
35
+		return Tca::grid()->isVisible($this->arguments['name']);
36
+	}
37 37
 
38 38
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Grid/Column/IsEditableViewHelper.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -17,22 +17,22 @@
 block discarded – undo
17 17
 class IsEditableViewHelper extends AbstractViewHelper
18 18
 {
19 19
 
20
-    /**
21
-     * @return void
22
-     */
23
-    public function initializeArguments()
24
-    {
25
-        $this->registerArgument('name', 'string', 'The column name', true);
26
-    }
20
+	/**
21
+	 * @return void
22
+	 */
23
+	public function initializeArguments()
24
+	{
25
+		$this->registerArgument('name', 'string', 'The column name', true);
26
+	}
27 27
 
28
-    /**
29
-     * Return whether field name is editable in the Grid.
30
-     *
31
-     * @return boolean
32
-     */
33
-    public function render()
34
-    {
35
-        return Tca::grid()->isEditable($this->arguments['name']);
36
-    }
28
+	/**
29
+	 * Return whether field name is editable in the Grid.
30
+	 *
31
+	 * @return boolean
32
+	 */
33
+	public function render()
34
+	{
35
+		return Tca::grid()->isEditable($this->arguments['name']);
36
+	}
37 37
 
38 38
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/Grid/Column/IsExcludedViewHelper.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -17,23 +17,23 @@
 block discarded – undo
17 17
 class IsExcludedViewHelper extends AbstractViewHelper
18 18
 {
19 19
 
20
-    /**
21
-     * @return void
22
-     */
23
-    public function initializeArguments()
24
-    {
25
-        $this->registerArgument('name', 'string', 'The column name', true);
26
-    }
20
+	/**
21
+	 * @return void
22
+	 */
23
+	public function initializeArguments()
24
+	{
25
+		$this->registerArgument('name', 'string', 'The column name', true);
26
+	}
27 27
 
28
-    /**
29
-     * Returns whether the column is excluded from the Grid.
30
-     *
31
-     * @return bool
32
-     */
33
-    public function render()
34
-    {
35
-        $excludedFields = Tca::grid()->getExcludedFields();
36
-        return !in_array($this->arguments['name'], $excludedFields, true);
37
-    }
28
+	/**
29
+	 * Returns whether the column is excluded from the Grid.
30
+	 *
31
+	 * @return bool
32
+	 */
33
+	public function render()
34
+	{
35
+		$excludedFields = Tca::grid()->getExcludedFields();
36
+		return !in_array($this->arguments['name'], $excludedFields, true);
37
+	}
38 38
 
39 39
 }
Please login to merge, or discard this patch.