当前位置: 首页>>代码示例>>PHP>>正文


PHP Folder::getIdentifier方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Resource\Folder::getIdentifier方法的典型用法代码示例。如果您正苦于以下问题:PHP Folder::getIdentifier方法的具体用法?PHP Folder::getIdentifier怎么用?PHP Folder::getIdentifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Resource\Folder的用法示例。


在下文中一共展示了Folder::getIdentifier方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 /**
  * Constructor for initializing the class
  *
  * @return 	void
  * @todo Define visibility
  */
 public function init()
 {
     // Initialize GPvars:
     $this->target = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target');
     $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
     if (!$this->returnUrl) {
         $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
     }
     // Create the folder object
     if ($this->target) {
         $this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
     }
     // Cleaning and checking target directory
     if (!$this->folderObject) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE);
         $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE);
         throw new \RuntimeException($title . ': ' . $message, 1294586843);
     }
     // Setting the title and the icon
     $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
     $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
     // Setting template object
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate('templates/file_upload.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->form = '<form action="tce_file.php" method="post" name="editform" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">';
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:33,代码来源:FileUploadController.php

示例2: ext_isLinkable

 /**
  * Returns TRUE if the input "record" contains a folder which can be linked.
  *
  * @param \TYPO3\CMS\Core\Resource\Folder $folderObject Object with information about the folder element. Contains keys like title, uid, path, _title
  * @return bool TRUE is returned if the path is found in the web-part of the server and is NOT a recycler or temp folder
  */
 public function ext_isLinkable(\TYPO3\CMS\Core\Resource\Folder $folderObject)
 {
     if (strstr($folderObject->getIdentifier(), '_recycler_') || strstr($folderObject->getIdentifier(), '_temp_')) {
         return FALSE;
     } else {
         return TRUE;
     }
 }
开发者ID:adrolli,项目名称:TYPO3.CMS,代码行数:14,代码来源:ElementBrowserFolderTreeView.php

示例3: ext_isLinkable

 /**
  * Returns TRUE if the input "record" contains a folder which can be linked.
  *
  * @param \TYPO3\CMS\Core\Resource\Folder $folderObject object with information about the folder element. Contains keys like title, uid, path, _title
  *
  * @return bool TRUE is returned if the path is NOT a recycler or temp folder AND if ->ext_noTempRecyclerDirs is not set.
  */
 public function ext_isLinkable($folderObject)
 {
     if ($this->ext_noTempRecyclerDirs && (substr($folderObject->getIdentifier(), -7) == '_temp_/' || substr($folderObject->getIdentifier(), -11) == '_recycler_/')) {
         return FALSE;
     } else {
         return TRUE;
     }
 }
开发者ID:adrolli,项目名称:TYPO3.CMS,代码行数:15,代码来源:ElementBrowserFolderTreeView.php

示例4: init

 /**
  * Initialize
  *
  * @return void
  */
 protected function init()
 {
     // Initialize GPvars:
     $this->target = GeneralUtility::_GP('target');
     $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
     if (!$this->returnUrl) {
         $this->returnUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
     }
     // Create the folder object
     if ($this->target) {
         $this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
     }
     if ($this->folderObject->getStorage()->getUid() === 0) {
         throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access folders outside your storages', 1375889834);
     }
     // Cleaning and checking target directory
     if (!$this->folderObject) {
         $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', true);
         $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', true);
         throw new \RuntimeException($title . ': ' . $message, 1294586843);
     }
     // Setting the title and the icon
     $icon = $this->iconFactory->getIcon('apps-filetree-root', Icon::SIZE_SMALL)->render();
     $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
     // Setting template object
     $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_upload.html');
     $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_file')) . '" method="post" name="editform" enctype="multipart/form-data">';
 }
开发者ID:hlop,项目名称:TYPO3.CMS,代码行数:34,代码来源:FileUploadController.php

示例5: getFolderName

 /**
  * Get main headline based on active folder or storage for backend module
  *
  * Folder names are resolved to their special names like done in the tree view.
  *
  * @param Folder $folder
  * @return string
  */
 protected function getFolderName(Folder $folder)
 {
     $name = $folder->getName();
     if ($name === '') {
         // Show storage name on storage root
         if ($folder->getIdentifier() === '/') {
             $name = $folder->getStorage()->getName();
         }
     } else {
         $name = key(ListUtility::resolveSpecialFolderNames(array($name => $folder)));
     }
     return $name;
 }
开发者ID:visol,项目名称:media,代码行数:21,代码来源:SelectedFolderInfo.php

示例6: getModuleHeadline

 /**
  * Get main headline based on active folder or storage for backend module
  *
  * Folder names are resolved to their special names like done in the tree view.
  *
  * @return string
  */
 protected function getModuleHeadline()
 {
     $name = $this->folderObject->getName();
     if ($name === '') {
         // Show storage name on storage root
         if ($this->folderObject->getIdentifier() === '/') {
             $name = $this->folderObject->getStorage()->getName();
         }
     } else {
         $name = key(ListUtility::resolveSpecialFolderNames(array($name => $this->folderObject)));
     }
     return $name;
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:20,代码来源:FileListController.php

示例7: init

    /**
     * Constructor function for class
     *
     * @return void
     * @todo Define visibility
     */
    public function init()
    {
        // Initialize GPvars:
        $this->number = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('number');
        $this->target = $combinedIdentifier = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target');
        $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
        // create the folder object
        if ($combinedIdentifier) {
            $this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($combinedIdentifier);
        }
        // Cleaning and checking target directory
        if (!$this->folderObject) {
            $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE);
            $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE);
            throw new \RuntimeException($title . ': ' . $message, 1294586843);
        }
        // Setting the title and the icon
        $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
        $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
        // Setting template object
        $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        $this->doc->setModuleTemplate('templates/file_newfolder.html');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->JScode = $this->doc->wrapScriptTags('
			var path = "' . $this->target . '";

			function reload(a) {	//
				if (!changed || (changed && confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.redraw')) . '))) {
					var params = "&target="+encodeURIComponent(path)+"&number="+a+"&returnUrl=' . rawurlencode($this->returnUrl) . '";
					window.location.href = "file_newfolder.php?"+params;
				}
			}
			function backToList() {	//
				top.goToModule("file_list");
			}

			var changed = 0;
		');
    }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:45,代码来源:CreateFolderController.php

示例8: init

    /**
     * Initialize
     *
     * @return void
     */
    protected function init()
    {
        // Initialize GPvars:
        $this->number = GeneralUtility::_GP('number');
        $this->target = $combinedIdentifier = GeneralUtility::_GP('target');
        $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
        // create the folder object
        if ($combinedIdentifier) {
            $this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($combinedIdentifier);
        }
        // Cleaning and checking target directory
        if (!$this->folderObject) {
            $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', TRUE);
            $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', TRUE);
            throw new \RuntimeException($title . ': ' . $message, 1294586845);
        }
        if ($this->folderObject->getStorage()->getUid() === 0) {
            throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access folders outside your storages', 1375889838);
        }
        // Setting the title and the icon
        $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
        $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
        // Setting template object
        $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
        $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_newfolder.html');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->JScode = $this->doc->wrapScriptTags('
			var path = "' . $this->target . '";

			function reload(a) {	//
				if (!changed || (changed && confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:mess.redraw')) . '))) {
					var params = "&target="+encodeURIComponent(path)+"&number="+a+"&returnUrl=' . rawurlencode($this->returnUrl) . '";
					window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('file_newfolder')) . '+params;
				}
			}
			function backToList() {	//
				top.goToModule("file_list");
			}

			var changed = 0;
		');
    }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:47,代码来源:CreateFolderController.php

示例9: init

    /**
     * Initialize
     *
     * @throws \TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException
     */
    protected function init()
    {
        // Initialize GPvars:
        $this->target = GeneralUtility::_GP('target');
        $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
        // Cleaning and checking target
        if ($this->target) {
            $this->fileOrFolderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
        }
        if (!$this->fileOrFolderObject) {
            $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', TRUE);
            $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', TRUE);
            throw new \RuntimeException($title . ': ' . $message, 1294586844);
        }
        if ($this->fileOrFolderObject->getStorage()->getUid() === 0) {
            throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException('You are not allowed to access files outside your storages', 1375889840);
        }
        // If a folder should be renamed, AND the returnURL should go to the old directory name, the redirect is forced
        // so the redirect will NOT end in a error message
        // this case only happens if you select the folder itself in the foldertree and then use the clickmenu to
        // rename the folder
        if ($this->fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
            $parsedUrl = parse_url($this->returnUrl);
            $queryParts = GeneralUtility::explodeUrl2Array(urldecode($parsedUrl['query']));
            if ($queryParts['id'] === $this->fileOrFolderObject->getCombinedIdentifier()) {
                $this->returnUrl = str_replace(urlencode($queryParts['id']), urlencode($this->fileOrFolderObject->getStorage()->getRootLevelFolder()->getCombinedIdentifier()), $this->returnUrl);
            }
        }
        // Setting icon and title
        $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
        $this->title = $icon . htmlspecialchars($this->fileOrFolderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileOrFolderObject->getIdentifier());
        // Setting template object
        $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
        $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_rename.html');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->JScode = $this->doc->wrapScriptTags('
			function backToList() {	//
				top.goToModule("file_list");
			}
		');
    }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:46,代码来源:RenameFileController.php

示例10: createFolder

    /**
     * For TBE: Makes a form for creating new folders in the filemount the user is browsing.
     * The folder creation request is sent to the tce_file.php script in the core which will handle the creation.
     *
     * @param Folder $folderObject Absolute filepath on server in which to create the new folder.
     * @return string HTML for the create folder form.
     * @todo Define visibility
     */
    public function createFolder(Folder $folderObject)
    {
        if (!$folderObject->checkActionPermission('write')) {
            return '';
        }
        if (!($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.createFoldersInEB'))) {
            return '';
        }
        // Don't show Folder-create form if it's denied
        if ($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.hideCreateFolder')) {
            return '';
        }
        // Create header, showing upload path:
        $header = $folderObject->getIdentifier();
        $code = '

			<!--
				Form, for creating new folders:
			-->
			<form action="' . $GLOBALS['BACK_PATH'] . 'tce_file.php" method="post" name="editform2" id="typo3-crFolderForm">
				<table border="0" cellpadding="0" cellspacing="0" id="typo3-crFolder">
					<tr>
						<td>' . $this->barheader($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle') . ':') . '</td>
					</tr>
					<tr>
						<td class="c-wCell c-hCell"><strong>' . $GLOBALS['LANG']->getLL('path', TRUE) . ':</strong> ' . htmlspecialchars($header) . '</td>
					</tr>
					<tr>
						<td class="c-wCell c-hCell">';
        // Create the new-folder name field:
        $a = 1;
        $code .= '<input' . $this->doc->formWidth(20) . ' type="text" name="file[newfolder][' . $a . '][data]" />' . '<input type="hidden" name="file[newfolder][' . $a . '][target]" value="' . htmlspecialchars($folderObject->getCombinedIdentifier()) . '" />';
        // Make footer of upload form, including the submit button:
        $redirectValue = $this->getThisScript() . 'act=' . $this->act . '&mode=' . $this->mode . '&expandFolder=' . rawurlencode($folderObject->getCombinedIdentifier()) . '&bparams=' . rawurlencode($this->bparams);
        $code .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($redirectValue) . '" />' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction') . '<input type="submit" name="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.submit', TRUE) . '" />';
        $code .= '</td>
					</tr>
				</table>
			</form>';
        return $code;
    }
开发者ID:allipierre,项目名称:Typo3,代码行数:49,代码来源:ElementBrowser.php

示例11: getUniqueName

 /**
  * Returns the destination path/fileName of a unique fileName/foldername in that path.
  * If $theFile exists in $theDest (directory) the file have numbers appended up to $this->maxNumber. Hereafter a unique string will be appended.
  * This function is used by fx. TCEmain when files are attached to records and needs to be uniquely named in the uploads/* folders
  *
  * @param Folder $folder
  * @param string $theFile The input fileName to check
  * @param bool $dontCheckForUnique If set the fileName is returned with the path prepended without checking whether it already existed!
  *
  * @throws \RuntimeException
  * @return string A unique fileName inside $folder, based on $theFile.
  * @see \TYPO3\CMS\Core\Utility\File\BasicFileUtility::getUniqueName()
  */
 protected function getUniqueName(Folder $folder, $theFile, $dontCheckForUnique = false)
 {
     static $maxNumber = 99, $uniqueNamePrefix = '';
     // Fetches info about path, name, extension of $theFile
     $origFileInfo = PathUtility::pathinfo($theFile);
     // Adds prefix
     if ($uniqueNamePrefix) {
         $origFileInfo['basename'] = $uniqueNamePrefix . $origFileInfo['basename'];
         $origFileInfo['filename'] = $uniqueNamePrefix . $origFileInfo['filename'];
     }
     // Check if the file exists and if not - return the fileName...
     // The destinations file
     $theDestFile = $origFileInfo['basename'];
     // If the file does NOT exist we return this fileName
     if (!$this->driver->fileExistsInFolder($theDestFile, $folder->getIdentifier()) || $dontCheckForUnique) {
         return $theDestFile;
     }
     // Well the fileName in its pure form existed. Now we try to append
     // numbers / unique-strings and see if we can find an available fileName
     // This removes _xx if appended to the file
     $theTempFileBody = preg_replace('/_[0-9][0-9]$/', '', $origFileInfo['filename']);
     $theOrigExt = $origFileInfo['extension'] ? '.' . $origFileInfo['extension'] : '';
     for ($a = 1; $a <= $maxNumber + 1; $a++) {
         // First we try to append numbers
         if ($a <= $maxNumber) {
             $insert = '_' . sprintf('%02d', $a);
         } else {
             $insert = '_' . substr(md5(uniqid('', true)), 0, 6);
         }
         $theTestFile = $theTempFileBody . $insert . $theOrigExt;
         // The destinations file
         $theDestFile = $theTestFile;
         // If the file does NOT exist we return this fileName
         if (!$this->driver->fileExistsInFolder($theDestFile, $folder->getIdentifier())) {
             return $theDestFile;
         }
     }
     throw new \RuntimeException('Last possible name "' . $theDestFile . '" is already taken.', 1325194291);
 }
开发者ID:TYPO3Incubator,项目名称:TYPO3.CMS,代码行数:52,代码来源:ResourceStorage.php

示例12: createFolder

    /**
     * For TBE: Makes a form for creating new folders in the filemount the user is browsing.
     * The folder creation request is sent to the tce_file.php script in the core which will handle the creation.
     *
     * @param Folder $folderObject Absolute filepath on server in which to create the new folder.
     * @return string HTML for the create folder form.
     */
    public function createFolder(Folder $folderObject)
    {
        if (!$folderObject->checkActionPermission('write')) {
            return '';
        }
        $backendUser = $this->getBackendUser();
        if (!($backendUser->isAdmin() || $backendUser->getTSConfigVal('options.createFoldersInEB'))) {
            return '';
        }
        // Don't show Folder-create form if it's denied
        if ($backendUser->getTSConfigVal('options.folderTree.hideCreateFolder')) {
            return '';
        }
        $lang = $this->getLanguageService();
        // Create header, showing upload path:
        $header = $folderObject->getIdentifier();
        $code = '

			<!--
				Form, for creating new folders:
			-->
			<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_file')) . '" method="post" name="editform2" id="typo3-crFolderForm">
				<table border="0" cellpadding="0" cellspacing="0" id="typo3-crFolder">
					<tr>
						<td>' . $this->barheader($lang->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle') . ':') . '</td>
					</tr>
					<tr>
						<td class="c-wCell c-hCell"><strong>' . $lang->getLL('path', true) . ':</strong> ' . htmlspecialchars($header) . '</td>
					</tr>
					<tr>
						<td class="c-wCell c-hCell">';
        // Create the new-folder name field:
        $a = 1;
        $code .= '<input' . $this->doc->formWidth(20) . ' type="text" name="file[newfolder][' . $a . '][data]" />' . '<input type="hidden" name="file[newfolder][' . $a . '][target]" value="' . htmlspecialchars($folderObject->getCombinedIdentifier()) . '" />';
        // Make footer of upload form, including the submit button:
        $redirectValue = $this->getThisScript() . 'act=' . $this->act . '&mode=' . $this->mode . '&expandFolder=' . rawurlencode($folderObject->getCombinedIdentifier()) . '&bparams=' . rawurlencode($this->bparams) . (is_array($this->P) ? GeneralUtility::implodeArrayForUrl('P', $this->P) : '');
        $code .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($redirectValue) . '" />' . '<input class="btn btn-default" type="submit" name="submit" value="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.submit', true) . '" />';
        $code .= '</td>
					</tr>
				</table>
			</form>';
        return $code;
    }
开发者ID:hlop,项目名称:TYPO3.CMS,代码行数:50,代码来源:ElementBrowser.php

示例13: postFolderRename

 /**
  * Update folder permissions records when a folder is renamed
  *
  * @param Folder $folder
  * @param string $newName
  */
 public function postFolderRename(Folder $folder, $newName)
 {
     $newFolder = $folder->getParentFolder()->getSubfolder($newName);
     $oldStorageUid = $folder->getStorage()->getUid();
     $newStorageUid = $newFolder->getStorage()->getUid();
     $this->utilityService->updateFolderRecord($oldStorageUid, $folder->getHashedIdentifier(), $folder->getIdentifier(), array('storage' => $newStorageUid, 'folder_hash' => $newFolder->getHashedIdentifier(), 'folder' => $newFolder->getIdentifier()));
     if (!empty($this->folderMapping[$folder->getCombinedIdentifier()])) {
         $newMapping = $this->getSubFolderIdentifiers($newFolder);
         foreach ($this->folderMapping[$folder->getCombinedIdentifier()] as $key => $folderInfo) {
             $this->utilityService->updateFolderRecord($oldStorageUid, $folderInfo[0], $folderInfo[1], array('storage' => $newStorageUid, 'folder_hash' => $newMapping[$key][0], 'folder' => $newMapping[$key][1]));
         }
     }
 }
开发者ID:camrun91,项目名称:fal_securedownload,代码行数:19,代码来源:FolderChangedSlot.php

示例14: createFile

 /**
  * Creates a new file and returns the matching file object for it.
  *
  * @param string $fileName
  * @param \TYPO3\CMS\Core\Resource\Folder $parentFolder
  * @return \TYPO3\CMS\Core\Resource\File
  */
 public function createFile($fileName, \TYPO3\CMS\Core\Resource\Folder $parentFolder)
 {
     if (!$this->isValidFilename($fileName)) {
         throw new \TYPO3\CMS\Core\Resource\Exception\InvalidFileNameException('Invalid characters in fileName "' . $fileName . '"', 1320572272);
     }
     $filePath = $parentFolder->getIdentifier() . ltrim($fileName, '/');
     // TODO set permissions of new file
     $result = touch($this->absoluteBasePath . $filePath);
     clearstatcache();
     if ($result !== TRUE) {
         throw new \RuntimeException('Creating file ' . $filePath . ' failed.', 1320569854);
     }
     $fileInfo = $this->getFileInfoByIdentifier($filePath);
     return $this->getFileObject($fileInfo);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:22,代码来源:LocalDriver.php

示例15: getPersistableDataArray

 /**
  * Returns an array of the persistable properties and contents
  * which are processable by TCEmain.
  *
  * @return array
  */
 protected function getPersistableDataArray()
 {
     return array('title' => $this->getTitle(), 'type' => self::$type, 'description' => $this->getDescription(), 'folder' => $this->folder->getIdentifier(), 'storage' => $this->folder->getStorage()->getUid());
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:10,代码来源:FolderBasedFileCollection.php


注:本文中的TYPO3\CMS\Core\Resource\Folder::getIdentifier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。