public function copyPageWithSubpages($row, $href, $label, $title, $icon, $attributes, $table) { if ($GLOBALS['TL_DCA'][$table]['config']['closed']) { return ''; } $objSubpages = $this->Database->prepare("SELECT * FROM tl_page WHERE pid=?")->limit(1)->execute($row['id']); return $objSubpages->numRows && $this->User->hasAccess($row['type'], 'alpty') && $this->User->isAllowed(BackendUser::CAN_EDIT_PAGE_HIERARCHY, $row) ? '<a href="' . $this->addToUrl($href . '&id=' . $row['id']) . '" title="' . StringUtil::specialchars($title) . '"' . $attributes . '>' . Image::getHtml($icon, $label) . '</a> ' : Image::getHtml(preg_replace('/\\.svg$/i', '_.svg', $icon)) . ' '; }