52 $GLOBALS[
'LANG']->includeLLFile(
'EXT:recycler/mod1/locallang.xlf');
64 $this->doc->setModuleTemplate(\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(
'recycler') .
'mod1/mod_template.html');
65 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
66 $this->doc->setExtDirectStateProvider();
67 $this->pageRenderer = $this->doc->getPageRenderer();
70 $this->isAccessibleForCurrentUser = $this->
id && is_array($this->pageRecord) || !$this->
id && $this->
isCurrentUserAdmin();
72 if (
$GLOBALS[
'BE_USER']->workspace !== 0) {
73 $this->isAccessibleForCurrentUser = FALSE;
76 $modTS =
$GLOBALS[
'BE_USER']->getTSConfig(
'mod.recycler');
78 $this->allowDelete = TRUE;
80 $this->allowDelete = $modTS[
'properties'][
'allowDelete'] ==
'1';
82 if (isset($modTS[
'properties'][
'recordsPageLimit']) && (
int)$modTS[
'properties'][
'recordsPageLimit'] > 0) {
83 $this->recordsPageLimit = (int)$modTS[
'properties'][
'recordsPageLimit'];
93 $this->content .= $this->doc->header(
$GLOBALS[
'LANG']->getLL(
'title'));
94 $this->content .=
'<p class="lead">' .
$GLOBALS[
'LANG']->getLL(
'description') .
'</p>';
95 if ($this->isAccessibleForCurrentUser) {
98 $this->content .=
'<div id="recyclerContent"></div>';
101 $this->content .= $this->doc->spacer(10);
114 $this->content = NULL;
125 return (
bool)
$GLOBALS[
'BE_USER']->user[
'admin'];
135 $this->pageRenderer->addCssFile($this->relativePath .
'res/css/customExtJs.css');
137 $this->pageRenderer->loadExtJS();
138 $this->pageRenderer->enableExtJSQuickTips();
144 $uxPath = $this->doc->backpath .
'js/extjs/ux/';
145 $this->pageRenderer->addJsFile($uxPath .
'Ext.grid.RowExpander.js');
146 $this->pageRenderer->addJsFile($uxPath .
'Ext.app.SearchField.js');
147 $this->pageRenderer->addJsFile($uxPath .
'Ext.ux.FitToParent.js');
149 $this->pageRenderer->addJsFile($this->relativePath .
'res/js/t3_recycler.js');
158 $configuration = array(
159 'pagingSize' => $this->recordsPageLimit,
160 'showDepthMenu' => 1,
161 'startUid' => $this->
id,
162 'tableDefault' =>
'pages',
163 'renderTo' =>
'recyclerContent',
165 'deleteDisable' => $this->allowDelete ? 0 : 1,
168 'States' =>
$GLOBALS[
'BE_USER']->uc[
'moduleData'][
'web_recycler'][
'States']
170 return $configuration;
180 'title' =>
$GLOBALS[
'LANG']->getLL(
'title'),
181 'path' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.path'),
182 'table' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.table'),
183 'depth' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_mod_web_perm.xlf:Depth'),
184 'depth_0' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_0'),
185 'depth_1' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_1'),
186 'depth_2' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_2'),
187 'depth_3' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_3'),
188 'depth_4' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_4'),
189 'depth_infi' =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')
192 $javaScriptLabels = array_merge($coreLabels, $extensionLabels);
193 return $javaScriptLabels;
205 $extraction = array();
206 $labels = array_merge((array)
$GLOBALS[
'LOCAL_LANG'][
'default'], (array) $GLOBALS[
'LOCAL_LANG'][$GLOBALS[
'LANG']->lang]);
208 $labelPattern =
'#^' . preg_quote($selectionPrefix,
'#') .
'(' . preg_quote($stripFromSelectionName,
'#') .
')?#';
210 foreach ($labels as $label => $value) {
211 if (strpos($label, $selectionPrefix) === 0) {
212 $key = preg_replace($labelPattern,
'', $label);
213 $extraction[$key] = $value;
231 $buttons[
'save'] =
'';
242 if (
$GLOBALS[
'BE_USER']->mayMakeShortcut()) {
243 $result = $this->doc->makeShortcutIcon(
'',
'function', $this->MCONF[
'name']);
256 'CONTENT' => $this->content,
257 'TITLE' =>
$GLOBALS[
'LANG']->getLL(
'title')
279 $sessionData = &
$GLOBALS[
'BE_USER']->uc[
'tx_recycler'];
280 if (isset($sessionData[$identifier]) && $sessionData[$identifier]) {
281 $data = $sessionData[$identifier];
static readPageAccess($id, $perms_clause)
getJavaScriptConfiguration()
getDataFromSession($identifier, $default=NULL)
$isAccessibleForCurrentUser
static cshItem($table, $field, $BACK_PATH, $wrap='', $onlyIconMode=FALSE, $styleAttrib='')
static getIndpEnv($getEnvName)
static makeInstance($className)
getJavaScriptLabelsFromLocallang($selectionPrefix='js.', $stripFromSelectionName='')
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
static getFuncMenu($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]