TslibMenu::processFilter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 4
1
<?php
2
3
namespace AOE\Languagevisibility\Hooks;
4
5
/***************************************************************
6
 * Copyright notice
7
 *
8
 * (c) 2010 Tolleiv
9
 * All rights reserved
10
 *
11
 * This script is part of the TYPO3 project. The TYPO3 project is
12
 * free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or
15
 * (at your option) any later version.
16
 *
17
 * The GNU General Public License can be found at
18
 * http://www.gnu.org/copyleft/gpl.html.
19
 *
20
 * This script is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU General Public License for more details.
24
 *
25
 * This copyright notice MUST APPEAR in all copies of the script!
26
 ***************************************************************/
27
28
/**
29
 * Class tx_languagevisibility_hooks_tslib_menu
30
 *
31
 * @package AOE\Languagevisibility\Hooks
32
 */
33
class TslibMenu implements \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuFilterPagesHookInterface {
34
35
	/**
36
	 * Checks if a page is OK to include in the final menu item array.
37
	 *
38
	 * @param array $data
39
	 * @param array $banUidArray
40
	 * @param $spacer
41
	 * @param TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject $obj
42
	 * @return bool
43
	 */
44
	public function tslib_menu_filterMenuPagesHook(array &$data, array $banUidArray, $spacer, \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject $obj) {
0 ignored issues
show
Unused Code introduced by
The parameter $banUidArray is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $spacer is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $obj is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
45
		if ($data['_NOTVISIBLE']) {
46
			return FALSE;
47
		} else {
48
			return TRUE;
49
		}
50
	}
51
52
	/**
53
	 * Checks if a page is OK to include in the final menu item array.
54
	 *
55
	 * @param array $data
56
	 * @param array $banUidArray
57
	 * @param bool $spacer
58
	 * @param TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject $obj
59
	 * @return bool
60
	 */
61
	public function processFilter(array &$data, array $banUidArray, $spacer, \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject $obj) {
62
		return $this->tslib_menu_filterMenuPagesHook($data, $banUidArray, $spacer, $obj);
63
	}
64
}
65