28 parent::__construct();
30 $GLOBALS[
'LANG']->includeLLFile(
'EXT:viewpage/Resources/Private/Language/locallang.xlf');
31 $this->pageRenderer =
$GLOBALS[
'TBE_TEMPLATE']->getPageRenderer();
32 $this->pageRenderer->addInlineSettingArray(
'web_view', array(
33 'States' =>
$GLOBALS[
'BE_USER']->uc[
'moduleData'][
'web_view'][
'States'],
35 $this->pageRenderer->addInlineLanguageLabelFile(
'EXT:viewpage/Resources/Private/Language/locallang.xlf');
44 $this->view->assignMultiple(
47 'url' => $this->getTargetUrl()
57 protected function getTargetUrl() {
58 $pageIdToShow = (int)\
TYPO3\CMS\Core\Utility\GeneralUtility::_GP(
'id');
64 $sysPage->init(FALSE);
65 $mountPointMpParameter =
'';
66 $finalPageIdToShow = $pageIdToShow;
67 $mountPointInformation = $sysPage->getMountPointInfo($pageIdToShow);
68 if ($mountPointInformation && $mountPointInformation[
'overlay']) {
70 $finalPageIdToShow = $mountPointInformation[
'mount_pid'];
71 $mountPointMpParameter =
'&MP=' . $mountPointInformation[
'MPvar'];
74 $protocolAndHost =
'..';
77 if (strpos($domainName,
'://') !== FALSE) {
78 $protocolAndHost = $domainName;
81 $page = (array)$sysPage->getPage($finalPageIdToShow);
82 if ($page[
'url_scheme'] == 2 || $page[
'url_scheme'] == 0 && \
TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv(
'TYPO3_SSL')) {
85 $protocolAndHost = $protocol .
'://' . $domainName;
88 return $protocolAndHost .
'/index.php?id=' . $finalPageIdToShow . $this->
getTypeParameterIfSet($finalPageIdToShow) . $mountPointMpParameter . $adminCommand;
101 if (is_array($pageinfo)) {
102 $addCommand =
'&ADMCMD_editIcons=1' . BackendUtility::ADMCMD_previewCmds($pageinfo);
118 $typeId = (int)$modTSconfig[
'properties'][
'type'];
120 $typeParameter =
'&type=' . $typeId;
122 return $typeParameter;
133 if ($previewDomainConfig[
'value']) {
134 $domain = $previewDomainConfig[
'value'];
147 $pageId = (int)\
TYPO3\CMS\Core\Utility\GeneralUtility::_GP(
'id');
149 $data = json_encode(array(
154 $data =>
$GLOBALS[
'LANG']->getLL(
'autoSize')
156 if (is_array($modTSconfig[
'properties'][
'previewFrameWidths.'])) {
157 foreach ($modTSconfig[
'properties'][
'previewFrameWidths.'] as $item => $conf ){
160 $width = substr($item, 0, -1);
161 $data = array(
'width' => $width);
162 $label .= $width .
'px ';
165 if (isset($conf[
'height'])) {
166 $label .=
' × ' . $conf[
'height'] .
'px ';
167 $data[
'height'] = $conf[
'height'];
170 if (substr($conf[
'label'], 0, 4) !==
'LLL:') {
171 $label .= $conf[
'label'];
173 $label .=
$GLOBALS[
'LANG']->sL(trim($conf[
'label']));
175 $widths[json_encode($data)] = $label;
static readPageAccess($id, $perms_clause)
static getModTSconfig($id, $TSref)
getTypeParameterIfSet($pageId)
static BEgetRootLine($uid, $clause='', $workspaceOL=FALSE)
static firstDomainRecord($rootLine)
static makeInstance($className)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static getPagesTSconfig($id, $rootLine=NULL, $returnPartArray=FALSE)