/**
     * Showing the permissions in a tree ($this->edit = false)
     * (Adding content to internal content variable).
     *
     * @return void
     */
    public function notEdit()
    {
        $backendUser = $this->getBackendUser();
        $language = $this->getLanguageService();
        // stores which depths already have their last item
        $depthStop = array();
        $lastDepth = 0;
        // Get usernames and groupnames: The arrays we get in return contains only
        // 1) users which are members of the groups of the current user,
        // 2) groups that the current user is member of
        $beGroupKeys = $backendUser->userGroupsUID;
        $beUserArray = BackendUtility::getUserNames();
        if (!$backendUser->isAdmin()) {
            $beUserArray = BackendUtility::blindUserNames($beUserArray, $beGroupKeys, 0);
        }
        $beGroupArray = BackendUtility::getGroupNames();
        if (!$backendUser->isAdmin()) {
            $beGroupArray = BackendUtility::blindGroupNames($beGroupArray, $beGroupKeys, 0);
        }
        // Length of strings:
        $tLen = 20;
        // Selector for depth:
        $code = $language->getLL('Depth') . ': ';
        $code .= BackendUtility::getFuncMenu($this->categoryUid, 'SET[depth]', $this->MOD_SETTINGS['depth'], $this->MOD_MENU['depth']);
        $this->content .= $this->doc->section('', $code);
        // Initialize tree object:
        /**
         * Category tree.
         *
         * @var \CommerceTeam\Commerce\Tree\CategoryTree $tree
         */
        $tree = GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Tree\\CategoryTree');
        $tree->setBare();
        $tree->init();
        $tree->readRecursively($this->categoryUid, $this->MOD_SETTINGS['depth']);
        // Creating top icon; the current page
        $rootIcon = IconUtility::getSpriteIcon('apps-pagetree-root');
        // Create the tree from $this->categoryUid:
        $tree->getTree();
        $tree = $tree->getRecordsAsArray($this->categoryUid);
        // Make header of table:
        $code = '
			<thead>
				<tr>
					<th colspan="2">&nbsp;</th>
					<th>' . $language->getLL('Owner', true) . '</th>
					<th align="center">' . $language->getLL('Group', true) . '</th>
					<th align="center">' . $language->getLL('Everybody', true) . '</th>
					<th align="center">' . $language->getLL('EditLock', true) . '</th>
				</tr>
			</thead>
		';
        // Traverse tree:
        foreach ($tree as $data) {
            $cells = array();
            $pageId = $data['row']['uid'];
            // Background colors:
            $bgCol = $this->lastEdited == $pageId ? ' class="bgColor-20"' : '';
            // User/Group names:
            $userId = $data['row']['perms_userid'];
            $userName = $beUserArray[$userId] ? $beUserArray[$userId]['username'] : $userId;
            if ($userId && !$beUserArray[$userId]) {
                $userName = PermissionAjaxController::renderOwnername($pageId, $userId, htmlspecialchars(GeneralUtility::fixed_lgd_cs($userName, 20)), false);
            } else {
                $userName = PermissionAjaxController::renderOwnername($pageId, $userId, htmlspecialchars(GeneralUtility::fixed_lgd_cs($userName, 20)));
            }
            $groupId = $data['row']['perms_groupid'] ? $data['row']['perms_groupid'] : '';
            $groupName = $beGroupArray[$groupId] ? $beGroupArray[$groupId]['title'] : $groupId;
            if ($groupId && !$beGroupArray[$groupId]) {
                $groupName = PermissionAjaxController::renderGroupname($pageId, $groupId, htmlspecialchars(GeneralUtility::fixed_lgd_cs($groupName, 20)), false);
            } else {
                $groupName = PermissionAjaxController::renderGroupname($pageId, $groupId, htmlspecialchars(GeneralUtility::fixed_lgd_cs($groupName, 20)));
            }
            // Seeing if editing of permissions are allowed for that page:
            $editPermsAllowed = $userId == $backendUser->user['uid'] || $backendUser->isAdmin();
            // First column:
            // @todo check for better solution
            $plusMinusIcon = '';
            // Add PM only if we are not looking at the root
            if ($data['depth'] > 0) {
                // Add simple join-images for categories that are deeper level than 1
                if ($data['depth'] > 1) {
                    $k = $data['depth'];
                    for ($j = 1; $j < $k; ++$j) {
                        if (!array_key_exists($j, $depthStop) || $depthStop[$j] != 1) {
                            $plusMinusIcon .= IconUtility::getSpriteIcon('treeline-line');
                        } elseif ($depthStop[$j] == 1) {
                            $plusMinusIcon .= IconUtility::getSpriteIcon('treeline-blank');
                        }
                    }
                }
                if ($lastDepth > $data['depth']) {
                    for ($j = $data['depth'] + 1; $j <= $lastDepth; ++$j) {
                        $depthStop[$j] = 0;
                    }
                }
                // Add cross or bottom
                $bottom = true == $data['last'] ? 'bottom' : '';
                // save that the depth of the current record has its last item - is used to
                // add blanks, not lines to following deeper elements
                if (true == $data['last']) {
                    $depthStop[$data['depth']] = 1;
                }
                $lastDepth = $data['depth'];
                $plusMinusIcon .= IconUtility::getSpriteIcon('treeline-join' . $bottom);
            }
            // determine which icon to use
            $rowIcon = $plusMinusIcon . ($pageId ? IconUtility::getSpriteIconForRecord('tx_commerce_categories', $data['row']) : $rootIcon);
            // @todo end of check for better solution
            // First column:
            $cellAttrib = $data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '';
            $cells[] = '<td align="left" nowrap="nowrap"' . ($cellAttrib ? $cellAttrib : $bgCol) . '>' . $rowIcon . htmlspecialchars(GeneralUtility::fixed_lgd_cs($data['row']['title'], $tLen)) . '</td>';
            // "Edit permissions" -icon
            if ($editPermsAllowed && $pageId) {
                $aHref = BackendUtility::getModuleUrl('commerce_permission') . '&mode=' . $this->MOD_SETTINGS['mode'] . '&depth=' . $this->MOD_SETTINGS['depth'] . '&control[tx_commerce_categories][uid]=' . ($data['row']['_ORIG_uid'] ? $data['row']['_ORIG_uid'] : $pageId) . '&return_id=' . $this->id . '&edit=1';
                $cells[] = '<td' . $bgCol . '><a href="' . htmlspecialchars($aHref) . '" title="' . $language->getLL('ch_permissions', 1) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a></td>';
            } else {
                $cells[] = LF . '<td' . $bgCol . '></td>';
            }
            $userPermission = PermissionAjaxController::renderPermissions($data['row']['perms_user'], $pageId, 'user');
            $groupPermission = PermissionAjaxController::renderPermissions($data['row']['perms_group'], $pageId, 'group');
            $allPermission = PermissionAjaxController::renderPermissions($data['row']['perms_everybody'], $pageId, 'everybody');
            $userPermissionLabel = $pageId ? $userPermission . ' ' . $userName : '';
            $groupPermissionLabel = $pageId ? $groupPermission . ' ' . $groupName : '';
            $allPermissionLabel = $pageId ? ' ' . $allPermission : '';
            if ($data['row']['editlock']) {
                $editLockLabel = '<span id="el_' . $pageId . '" class="editlock"><a class="editlock"
                    onclick="WebPermissions.toggleEditLock(\'' . $pageId . '\', \'1\');" title="' . $language->getLL('EditLock_descr', true) . '">' . IconUtility::getSpriteIcon('status-warning-lock') . '</a></span>';
            } else {
                $editLockLabel = $pageId === 0 ? '' : '<span id="el_' . $pageId . '" class="editlock"><a class="editlock" onclick="WebPermissions.toggleEditLock(\'' . $pageId . '\', \'0\');" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">[+]</a></span>';
            }
            $cells[] = '
                <td' . $bgCol . ' nowrap="nowrap">' . $userPermissionLabel . '</td>
                <td' . $bgCol . ' nowrap="nowrap">' . $groupPermissionLabel . '</td>
                <td' . $bgCol . ' nowrap="nowrap">' . $allPermissionLabel . '</td>
                <td' . $bgCol . ' nowrap="nowrap">' . $editLockLabel . '</td>
            ';
            // Compile table row:
            $code .= '<tr>' . implode(LF, $cells) . '</tr>';
        }
        // Wrap rows in table tags:
        $code = '<table class="t3-table" id="typo3-permissionList">' . $code . '</table>';
        // Adding the content as a section:
        $this->content .= $this->doc->section('', $code);
        // CSH for permissions setting
        $this->content .= BackendUtility::cshItem('xMOD_csh_corebe', 'perm_module', $this->getBackPath(), '<br />|');
        // Creating legend table:
        $legendText = '<strong>' . $language->getLL('1', true) . '</strong>: ' . $language->getLL('1_t', true) . '<br /><strong>' . $language->getLL('16', true) . '</strong>: ' . $language->getLL('16_t', true) . '<br /><strong>' . $language->getLL('2', true) . '</strong>: ' . $language->getLL('2_t', true) . '<br /><strong>' . $language->getLL('4', true) . '</strong>: ' . $language->getLL('4_t', true) . '<br /><strong>' . $language->getLL('8', true) . '</strong>: ' . $language->getLL('8_t', true);
        $code = '<div id="permission-information">
                    <img' . IconUtility::skinImg($this->getBackPath(), 'gfx/legend.gif', 'width="86" height="75"') . ' alt="" />
                <div class="text">' . $legendText . '</div></div>';
        $code .= '<div id="perm-legend">' . $language->getLL('def', true);
        $code .= '<br /><br />' . IconUtility::getSpriteIcon('status-status-permission-granted') . ': ' . $language->getLL('A_Granted', true);
        $code .= '<br />' . IconUtility::getSpriteIcon('status-status-permission-denied') . ': ' . $language->getLL('A_Denied', true) . '</div>';
        // Adding section with legend code:
        $this->content .= $this->doc->section($language->getLL('Legend') . ':', $code, true, true);
    }
    /**
     * Showing the permissions in a tree ($this->edit = FALSE)
     * (Adding content to internal content variable)
     *
     * @return void
     */
    public function notEdit()
    {
        // Get usernames and groupnames: The arrays we get in return contains only 1) users which are members of the groups of the current user, 2) groups that the current user is member of
        $beGroupKeys = $GLOBALS['BE_USER']->userGroupsUID;
        $beUserArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
        if (!$GLOBALS['BE_USER']->isAdmin()) {
            $beUserArray = \TYPO3\CMS\Backend\Utility\BackendUtility::blindUserNames($beUserArray, $beGroupKeys, 0);
        }
        $beGroupArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames();
        if (!$GLOBALS['BE_USER']->isAdmin()) {
            $beGroupArray = \TYPO3\CMS\Backend\Utility\BackendUtility::blindGroupNames($beGroupArray, $beGroupKeys, 0);
        }
        // Length of strings:
        $tLen = $this->MOD_SETTINGS['mode'] == 'perms' ? 20 : 30;
        // Selector for depth:
        $code = $GLOBALS['LANG']->getLL('Depth') . ': ';
        $code .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[depth]', $this->MOD_SETTINGS['depth'], $this->MOD_MENU['depth']);
        $this->content .= $this->doc->section('', $code);
        $this->content .= $this->doc->spacer(5);
        // Initialize tree object:
        $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\View\\PageTreeView');
        $tree->init('AND ' . $this->perms_clause);
        $tree->addField('perms_user', 1);
        $tree->addField('perms_group', 1);
        $tree->addField('perms_everybody', 1);
        $tree->addField('perms_userid', 1);
        $tree->addField('perms_groupid', 1);
        $tree->addField('hidden');
        $tree->addField('fe_group');
        $tree->addField('starttime');
        $tree->addField('endtime');
        $tree->addField('editlock');
        // Creating top icon; the current page
        $HTML = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $this->pageinfo);
        $tree->tree[] = array('row' => $this->pageinfo, 'HTML' => $HTML);
        // Create the tree from $this->id:
        $tree->getTree($this->id, $this->MOD_SETTINGS['depth'], '');
        // Make header of table:
        $code = '';
        if ($this->MOD_SETTINGS['mode'] == 'perms') {
            $code .= '
				<tr class="t3-row-header">
					<td colspan="2">&nbsp;</td>
					<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td>' . $GLOBALS['LANG']->getLL('Owner', TRUE) . '</td>
					<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td align="center">' . $GLOBALS['LANG']->getLL('Group', TRUE) . '</td>
					<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td align="center">' . $GLOBALS['LANG']->getLL('Everybody', TRUE) . '</td>
					<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td align="center">' . $GLOBALS['LANG']->getLL('EditLock', TRUE) . '</td>
				</tr>
			';
        } else {
            $code .= '
				<tr class="t3-row-header">
					<td colspan="2">&nbsp;</td>
					<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td align="center" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('User', TRUE) . ': ' . htmlspecialchars($GLOBALS['BE_USER']->user['username']) . '</td>
					' . (!$GLOBALS['BE_USER']->isAdmin() ? '<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td align="center">' . $GLOBALS['LANG']->getLL('EditLock', TRUE) . '</td>' : '') . '
				</tr>';
        }
        // Traverse tree:
        foreach ($tree->tree as $data) {
            $cells = array();
            $pageId = $data['row']['uid'];
            // Background colors:
            $bgCol = $this->lastEdited == $pageId ? ' class="bgColor-20"' : '';
            $lE_bgCol = $bgCol;
            // User/Group names:
            $userName = $beUserArray[$data['row']['perms_userid']] ? $beUserArray[$data['row']['perms_userid']]['username'] : ($data['row']['perms_userid'] ? $data['row']['perms_userid'] : '');
            if ($data['row']['perms_userid'] && !$beUserArray[$data['row']['perms_userid']]) {
                $userName = \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderOwnername($pageId, $data['row']['perms_userid'], htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($userName, 20)), FALSE);
            } else {
                $userName = \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderOwnername($pageId, $data['row']['perms_userid'], htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($userName, 20)));
            }
            $groupName = $beGroupArray[$data['row']['perms_groupid']] ? $beGroupArray[$data['row']['perms_groupid']]['title'] : ($data['row']['perms_groupid'] ? $data['row']['perms_groupid'] : '');
            if ($data['row']['perms_groupid'] && !$beGroupArray[$data['row']['perms_groupid']]) {
                $groupName = \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderGroupname($pageId, $data['row']['perms_groupid'], htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($groupName, 20)), FALSE);
            } else {
                $groupName = \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderGroupname($pageId, $data['row']['perms_groupid'], htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($groupName, 20)));
            }
            // Seeing if editing of permissions are allowed for that page:
            $editPermsAllowed = $data['row']['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin();
            // First column:
            $cellAttrib = $data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '';
            $cells[] = '
					<td align="left" nowrap="nowrap"' . ($cellAttrib ? $cellAttrib : $bgCol) . '>' . $data['HTML'] . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['title'], $tLen)) . '&nbsp;</td>';
            // "Edit permissions" -icon
            if ($editPermsAllowed && $pageId) {
                $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_perm') . '&mode=' . $this->MOD_SETTINGS['mode'] . '&depth=' . $this->MOD_SETTINGS['depth'] . '&id=' . ($data['row']['_ORIG_uid'] ? $data['row']['_ORIG_uid'] : $pageId) . '&return_id=' . $this->id . '&edit=1';
                $cells[] = '
					<td' . $bgCol . '><a href="' . htmlspecialchars($aHref) . '" title="' . $GLOBALS['LANG']->getLL('ch_permissions', 1) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a></td>';
            } else {
                $cells[] = '
					<td' . $bgCol . '></td>';
            }
            // Rest of columns (depending on mode)
            if ($this->MOD_SETTINGS['mode'] == 'perms') {
                $cells[] = '
					<td' . $bgCol . ' class="center"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td' . $bgCol . ' nowrap="nowrap">' . ($pageId ? \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderPermissions($data['row']['perms_user'], $pageId, 'user') . ' ' . $userName : '') . '</td>

					<td' . $bgCol . ' class="center"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td' . $bgCol . ' nowrap="nowrap">' . ($pageId ? \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderPermissions($data['row']['perms_group'], $pageId, 'group') . ' ' . $groupName : '') . '</td>

					<td' . $bgCol . ' class="center"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td' . $bgCol . ' nowrap="nowrap">' . ($pageId ? ' ' . \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderPermissions($data['row']['perms_everybody'], $pageId, 'everybody') : '') . '</td>

					<td' . $bgCol . ' class="center"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td' . $bgCol . ' nowrap="nowrap">' . ($data['row']['editlock'] ? '<span id="el_' . $pageId . '" class="editlock"><a class="editlock" onclick="WebPermissions.toggleEditLock(\'' . $pageId . '\', \'1\');" title="' . $GLOBALS['LANG']->getLL('EditLock_descr', 1) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-warning-lock') . '</a></span>' : ($pageId === 0 ? '' : '<span id="el_' . $pageId . '" class="editlock"><a class="editlock" onclick="WebPermissions.toggleEditLock(\'' . $pageId . '\', \'0\');" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">[+]</a></span>')) . '</td>
				';
            } else {
                $cells[] = '
					<td' . $bgCol . ' class="center"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>';
                $bgCol = $GLOBALS['BE_USER']->user['uid'] == $data['row']['perms_userid'] ? ' class="bgColor-20"' : $lE_bgCol;
                // FIXME $owner undefined
                $cells[] = '
					<td' . $bgCol . ' nowrap="nowrap" align="center">' . ($pageId ? $owner . \TYPO3\CMS\Perm\Controller\PermissionAjaxController::renderPermissions($GLOBALS['BE_USER']->calcPerms($data['row']), $pageId, 'user') : '') . '</td>
					' . (!$GLOBALS['BE_USER']->isAdmin() ? '
					<td' . $bgCol . ' class="center"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
					<td' . $bgCol . ' nowrap="nowrap">' . ($data['row']['editlock'] ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-warning-lock', array('title' => $GLOBALS['LANG']->getLL('EditLock_descr', TRUE))) : '') . '</td>
					' : '');
                $bgCol = $lE_bgCol;
            }
            // Compile table row:
            $code .= '
				<tr>
					' . implode('
					', $cells) . '
				</tr>';
        }
        // Wrap rows in table tags:
        $code = '<table border="0" cellspacing="0" cellpadding="0" id="typo3-permissionList">' . $code . '</table>';
        // Adding the content as a section:
        $this->content .= $this->doc->section('', $code);
        // CSH for permissions setting
        $this->content .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'perm_module', $GLOBALS['BACK_PATH'], '<br />|');
        // Creating legend table:
        $legendText = '<strong>' . $GLOBALS['LANG']->getLL('1', 1) . '</strong>: ' . $GLOBALS['LANG']->getLL('1_t', 1);
        $legendText .= '<br /><strong>' . $GLOBALS['LANG']->getLL('16', 1) . '</strong>: ' . $GLOBALS['LANG']->getLL('16_t', 1);
        $legendText .= '<br /><strong>' . $GLOBALS['LANG']->getLL('2', 1) . '</strong>: ' . $GLOBALS['LANG']->getLL('2_t', 1);
        $legendText .= '<br /><strong>' . $GLOBALS['LANG']->getLL('4', 1) . '</strong>: ' . $GLOBALS['LANG']->getLL('4_t', 1);
        $legendText .= '<br /><strong>' . $GLOBALS['LANG']->getLL('8', 1) . '</strong>: ' . $GLOBALS['LANG']->getLL('8_t', 1);
        $code = '<table border="0" id="typo3-legendTable">
			<tr>
				<td valign="top">
					<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/legend.gif', 'width="86" height="75"') . ' alt="" />
				</td>
				<td valign="top" nowrap="nowrap">' . $legendText . '</td>
			</tr>
		</table>';
        $code .= '<div id="perm-legend">' . $GLOBALS['LANG']->getLL('def', 1);
        $code .= '<br /><br />' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-permission-granted') . ': ' . $GLOBALS['LANG']->getLL('A_Granted', 1);
        $code .= '<br />' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-permission-denied') . ': ' . $GLOBALS['LANG']->getLL('A_Denied', 1);
        $code .= '</div>';
        // Adding section with legend code:
        $this->content .= $this->doc->spacer(20);
        $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Legend') . ':', $code, 0, 1);
    }