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


PHP t3lib_div::intExplode方法代码示例

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


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

示例1: getGroupMembers

 /**
  * Returns the users which are in the groups with the given UIDs.
  *
  * @param string $groupUids
  *        the UIDs of the user groups from which to get the users, must be a
  *        comma-separated list of group UIDs, must not be empty
  *
  * @return Tx_Oelib_List<Tx_Oelib_Model_FrontEndUser> the found user models, will be empty if
  *                       no users were found for the given groups
  */
 public function getGroupMembers($groupUids)
 {
     if ($groupUids === '') {
         throw new InvalidArgumentException('$groupUids must not be an empty string.', 1331488505);
     }
     return $this->getListOfModels(Tx_Oelib_Db::selectMultiple('*', $this->getTableName(), $this->getUniversalWhereClause() . ' AND ' . 'usergroup REGEXP \'(^|,)(' . implode('|', t3lib_div::intExplode(',', $groupUids)) . ')($|,)\''));
 }
开发者ID:Konafets,项目名称:oelib,代码行数:17,代码来源:FrontEndUser.php

示例2: create

 /**
  * Creates a query object working on the given class name
  *
  * @param string $className The class name
  * @return Tx_Extbase_Persistence_QueryInterface
  */
 public function create($className)
 {
     $query = $this->objectManager->create('Tx_Extbase_Persistence_QueryInterface', $className);
     $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
     $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $querySettings->setStoragePageIds(t3lib_div::intExplode(',', $frameworkConfiguration['persistence']['storagePid']));
     $query->setQuerySettings($querySettings);
     return $query;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:15,代码来源:QueryFactory.php

示例3: sortExplode

 /**
  * Explodes a comma-separated list of integer values and sorts them
  * numerically.
  *
  * @param string $valueList
  *        comma-separated list of values, may be empty
  *
  * @return int[] the separate values, sorted numerically, may be empty
  */
 private function sortExplode($valueList)
 {
     if ($valueList === '') {
         return array();
     }
     $numbers = t3lib_div::intExplode(',', $valueList);
     sort($numbers, SORT_NUMERIC);
     return $numbers;
 }
开发者ID:Konafets,项目名称:oelib,代码行数:18,代码来源:DbTest.php

示例4: determineStoragePidForNewRecord

 protected function determineStoragePidForNewRecord($entity)
 {
     $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $className = \Doctrine\Common\Util\ClassUtils::getClass($object);
     if (isset($frameworkConfiguration['persistence']['classes'][$className]) && !empty($frameworkConfiguration['persistence']['classes'][$className]['newRecordStoragePid'])) {
         return (int) $frameworkConfiguration['persistence']['classes'][$className]['newRecordStoragePid'];
     }
     $storagePidList = t3lib_div::intExplode(',', $frameworkConfiguration['persistence']['storagePid']);
     return (int) $storagePidList[0];
 }
开发者ID:rekrut,项目名称:typo3-extbase-doctrine2-extension,代码行数:10,代码来源:StoragePidListener.php

示例5: create

 /**
  * @return Tx_Doctrine2_Query
  */
 public function create($className)
 {
     $query = new Tx_Doctrine2_Query($className);
     $query->injectEntityManager($this->manager->getEntityManager());
     if (!$this->objectManager || !$this->configurationManager) {
         return $query;
     }
     $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_QuerySettingsInterface');
     $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $querySettings->setStoragePageIds(t3lib_div::intExplode(',', $frameworkConfiguration['persistence']['storagePid']));
     $query->setQuerySettings($querySettings);
     return $query;
 }
开发者ID:rekrut,项目名称:typo3-extbase-doctrine2-extension,代码行数:16,代码来源:QueryFactory.php

示例6: main

 /**
  * Main function, rendering the element browser in RTE mode.
  *
  * @return	void
  */
 function main()
 {
     // Setting alternative web browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
     $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
     // Clear temporary DB mounts
     $tmpMount = t3lib_div::_GET('setTempDBmount');
     if (isset($tmpMount)) {
         $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint', intval($tmpMount));
     }
     // Set temporary DB mounts
     $tempDBmount = intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'));
     if ($tempDBmount) {
         $altMountPoints = $tempDBmount;
     }
     if ($altMountPoints) {
         $GLOBALS['BE_USER']->groupData['webmounts'] = implode(',', array_unique(t3lib_div::intExplode(',', $altMountPoints)));
         $GLOBALS['WEBMOUNTS'] = $GLOBALS['BE_USER']->returnWebmounts();
     }
     // Setting alternative file browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
     $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
     if ($altMountPoints) {
         $altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
         foreach ($altMountPoints as $filePathRelativeToFileadmindir) {
             $GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 'readonly');
         }
         $GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
     }
     // Render type by user function
     $browserRendered = false;
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'] as $classRef) {
             $browserRenderObj = t3lib_div::getUserObj($classRef);
             if (is_object($browserRenderObj) && method_exists($browserRenderObj, 'isValid') && method_exists($browserRenderObj, 'render')) {
                 if ($browserRenderObj->isValid($this->mode, $this)) {
                     $this->content .= $browserRenderObj->render($this->mode, $this);
                     $browserRendered = true;
                     break;
                 }
             }
         }
     }
     // If type was not rendered, use default rendering functions
     if (!$browserRendered) {
         $GLOBALS['SOBE']->browser = t3lib_div::makeInstance('tx_rtehtmlarea_browse_links');
         $GLOBALS['SOBE']->browser->init();
         $modData = $GLOBALS['BE_USER']->getModuleData('browse_links.php', 'ses');
         list($modData, $store) = $GLOBALS['SOBE']->browser->processSessionData($modData);
         $GLOBALS['BE_USER']->pushModuleData('browse_links.php', $modData);
         $this->content = $GLOBALS['SOBE']->browser->main_rte();
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:56,代码来源:browse_links.php

示例7: generateSitemapContent

 /**
  * Generates extension site map.
  *
  * @return    void
  */
 protected function generateSitemapContent()
 {
     $selector = trim(t3lib_div::_GP('selector'));
     t3lib_div::loadTCA($selector);
     $typoscriptSelector = $selector . '.';
     $currentSetup = $GLOBALS['TSFE']->tmpl->setup['plugin.']['dd_googlesitemap_dmf.'][$typoscriptSelector];
     $pidList = $currentSetup['pidList'] ? t3lib_div::intExplode(',', $currentSetup['pidList']) : $this->pidList;
     $catList = t3lib_div::_GP('catList') ? t3lib_div::intExplode(',', t3lib_div::_GP('catList')) : t3lib_div::intExplode(',', $currentSetup['catList']);
     $catMMList = t3lib_div::_GP('catMMList') ? t3lib_div::intExplode(',', t3lib_div::_GP('catMMList')) : t3lib_div::intExplode(',', $currentSetup['catMMList']);
     $currentSetup['singlePid'] = t3lib_div::_GP('singlePid') ? intval(t3lib_div::_GP('singlePid')) : intval($currentSetup['singlePid']);
     $currentSetup['languageUid'] = '';
     if (!$currentSetup['disableLanguageCheck']) {
         if (is_int($GLOBALS['TSFE']->sys_language_uid)) {
             // set language through TSFE checkup
             $currentSetup['languageUid'] = intval($GLOBALS['TSFE']->sys_language_uid);
         }
         if (t3lib_div::_GP('L')) {
             // overwrites if L param is set
             $currentSetup['languageUid'] = intval(t3lib_div::_GP('L'));
         }
     }
     if (count($pidList) > 0 && isset($selector) && isset($currentSetup)) {
         $table = $currentSetup['sqlMainTable'];
         $mmTable = $currentSetup['sqlMMTable'];
         $catColumn = $currentSetup['sqlCatColumn'];
         $sqlCondition = $catColumn && count($catList) > 0 && $catList[0] > 0 ? ' AND ' . $catColumn . ' IN (' . implode(',', $catList) . ')' : '';
         $sqlMMCondition = $sqlMMTable = '';
         if ($mmTable != '' && count($catMMList) > 0 && $catMMList[0] > 0) {
             $sqlMMTable = ',' . $mmTable;
             $sqlMMCondition = ' AND ' . $table . '.uid = ' . $mmTable . '.uid_local AND ' . $mmTable . '.uid_foreign IN (' . implode(',', $catMMList) . ')';
         }
         $newsSelect = t3lib_div::_GP('type') == 'news' ? ',' . $currentSetup['sqlTitle'] . ',' . $currentSetup['sqlKeywords'] : '';
         $languageWhere = is_int($currentSetup['languageUid']) ? ' AND ' . $table . '.sys_language_uid=' . $currentSetup['languageUid'] : '';
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,' . $currentSetup['sqlLastUpdated'] . $newsSelect, $table . $sqlMMTable, 'pid IN (' . implode(',', $pidList) . ')' . $sqlCondition . $sqlMMCondition . $this->cObj->enableFields($table) . $languageWhere, 'uid', $currentSetup['sqlOrder'] ? $currentSetup['sqlOrder'] : '');
         $rowCount = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
         while (FALSE !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {
             if ($url = $this->getVariousItemUrl($row['uid'], $currentSetup)) {
                 $frequency = $currentSetup['frequency'] ? $currentSetup['frequency'] : $this->getChangeFrequency($row[$currentSetup['sqlLastUpdated']]);
                 echo $this->renderer->renderEntry($url, $row[$currentSetup['sqlTitle']], $row[$currentSetup['sqlLastUpdated']], $frequency, $row[$currentSetup['sqlKeywords']]);
             }
         }
         $GLOBALS['TYPO3_DB']->sql_free_result($res);
         if ($rowCount === 0) {
             echo '<!-- It appears that there are no extension entries. If your ' . 'storage sysfolder is outside of the rootline, you may ' . 'want to use the dd_googlesitemap.skipRootlineCheck=1 TS ' . 'setup option. Beware: it is insecure and may cause certain ' . 'undesired effects! Better move your pid sysfolder ' . 'inside the rootline! -->';
         } elseif (!$rowCount) {
             echo '<!-- There is an sql error. please check all corresponding sql fields in your typoscript setup. -->';
         }
     } else {
         echo 'There is something wrong with the config. Please check your selector and pidList elements. You may ' . 'want to use the dd_googlesitemap.skipRootlineCheck=1 TS ' . 'setup option if your storage sysfolder is outside the rootline. Beware: it is insecure and may cause certain ' . 'undesired effects! Better move your pid sysfolder ' . 'inside the rootline! -->';
     }
 }
开发者ID:BastianBalthasarBux,项目名称:dd_googlesitemap_dmf,代码行数:56,代码来源:class.tx_ddgooglesitemap_dmf.php

示例8: createConstraintsFromDemand

 /**
  * Returns an array of constraints created from a given demand object.
  *
  * @param Tx_Extbase_Persistence_QueryInterface $query
  * @param Tx_News_Domain_Model_DemandInterface $demand
  * @return array<Tx_Extbase_Persistence_QOM_Constrain>
  */
 protected function createConstraintsFromDemand(Tx_Extbase_Persistence_QueryInterface $query, Tx_News_Domain_Model_DemandInterface $demand)
 {
     $constraints = array();
     // Storage page
     if ($demand->getStoragePage() != 0) {
         $pidList = t3lib_div::intExplode(',', $demand->getStoragePage(), TRUE);
         $constraints[] = $query->in('pid', $pidList);
     }
     // Clean not used constraints
     foreach ($constraints as $key => $value) {
         if (is_null($value)) {
             unset($constraints[$key]);
         }
     }
     return $constraints;
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:23,代码来源:TagRepository.php

示例9: listAction

 /**
  * action list
  *
  * @param Tx_WoehrlSeminare_Domain_Model_Category $category
  * @ignorevalidation
  * @return void
  */
 public function listAction(Tx_WoehrlSeminare_Domain_Model_Category $category = NULL)
 {
     //~ t3lib_utility_Debug::debug($this->settings, 'settings... ');
     // take the root category of the flexform
     $category = $this->categoryRepository->findAllByUids(t3lib_div::intExplode(',', $this->settings['categorySelection'], TRUE))->getFirst();
     //~ t3lib_utility_Debug::debug($category, 'category... ');
     $categories = $this->categoryRepository->findCurrentBranch($category);
     //~ $categories = $this->categoryRepository->findCurrentLevel($category);
     //~ t3lib_utility_Debug::debug($categories, 'listAction... ');
     if (count($categories) == 0) {
         // there are no further child categories --> show events
         $this->forward('gbList');
     } else {
         $this->view->assign('categories', $categories);
     }
 }
开发者ID:woehrlag,项目名称:Intranet,代码行数:23,代码来源:CategoryController.php

示例10: extendPidListByChildren

 /**
  * Find all ids from given ids and level
  *
  * @param string $pidList comma separated list of ids
  * @param integer $recursive recursive levels
  * @return string comma separated list of ids
  */
 public static function extendPidListByChildren($pidList = '', $recursive = 0)
 {
     $recursive = (int) $recursive;
     if ($recursive <= 0) {
         return $pidList;
     }
     $queryGenerator = t3lib_div::makeInstance('t3lib_queryGenerator');
     $recursiveStoragePids = $pidList;
     $storagePids = t3lib_div::intExplode(',', $pidList);
     foreach ($storagePids as $startPid) {
         $pids = $queryGenerator->getTreeList($startPid, $recursive, 0, 1);
         if (strlen($pids) > 0) {
             $recursiveStoragePids .= ',' . $pids;
         }
     }
     return $recursiveStoragePids;
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:24,代码来源:Page.php

示例11: getResultsPerPageOptions

 /**
  * Generates the options for the results per page switch.
  *
  * @return array Array of results per page switch options.
  */
 public function getResultsPerPageOptions()
 {
     $resultsPerPageOptions = array();
     $resultsPerPageSwitchOptions = t3lib_div::intExplode(',', $this->configuration['search.']['results.']['resultsPerPageSwitchOptions'], TRUE);
     $currentNumberOfResultsShown = $this->parentPlugin->getNumberOfResultsPerPage();
     $queryLinkBuilder = t3lib_div::makeInstance('Tx_Solr_Query_LinkBuilder', $this->parentPlugin->getSearch()->getQuery());
     $queryLinkBuilder->removeUnwantedUrlParameter('resultsPerPage');
     $queryLinkBuilder->setLinkTargetPageId($this->parentPlugin->getLinkTargetPageId());
     foreach ($resultsPerPageSwitchOptions as $option) {
         $selected = '';
         $selectedClass = '';
         if ($option == $currentNumberOfResultsShown) {
             $selected = ' selected="selected"';
             $selectedClass = ' class="currentNumberOfResults"';
         }
         $resultsPerPageOptions[] = array('value' => $option, 'selected' => $selected, 'selectedClass' => $selectedClass, 'url' => $queryLinkBuilder->getQueryUrl(array('resultsPerPage' => $option)));
     }
     return $resultsPerPageOptions;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:24,代码来源:ResultsPerPageSwitchCommand.php

示例12: includeStaticTypoScriptSources

 /**
  * Includes static template records from static_template table, loaded through a hook
  *
  * @param	string		A list of already processed template ids including the current; The list is on the form "[prefix]_[uid]" where [prefix] is "sys" for "sys_template" records, "static" for "static_template" records and "ext_" for static include files (from extensions). The list is used to check that the recursive inclusion of templates does not go into circles: Simply it is used to NOT include a template record/file which has already BEEN included somewhere in the recursion.
  * @param	string		The id of the current template. Same syntax as $idList ids, eg. "sys_123"
  * @param	array		The PID of the input template record
  * @param	array		A full TypoScript template record
  * @return	void
  */
 public function includeStaticTypoScriptSources(&$params, &$pObj)
 {
     // Static Template Records (static_template): include_static is a
     // list of static templates to include
     if (trim($params['row']['include_static'])) {
         $includeStaticArr = t3lib_div::intExplode(',', $params['row']['include_static']);
         // traversing list
         foreach ($includeStaticArr as $id) {
             // if $id is not already included ...
             if (!t3lib_div::inList($params['idList'], 'static_' . $id)) {
                 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'static_template', 'uid = ' . intval($id));
                 // there was a template, then we fetch that
                 if ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                     $subrow = $pObj->prependStaticExtra($subrow);
                     $pObj->processTemplate($subrow, $params['idList'] . ',static_' . $id, $params['pid'], 'static_' . $id, $params['templateId']);
                 }
                 $GLOBALS['TYPO3_DB']->sql_free_result($res);
             }
         }
     }
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:30,代码来源:class.tx_statictemplates.php

示例13: flexform_getFlexformPointersToSubElementsRecursively

 /**
  * Returns an array of flexform pointers to all sub elements of the element specified by $table and $uid.
  *
  * @param	string		$table: Name of the table of the parent element ('pages' or 'tt_content')
  * @param	integer		$uid: UID of the parent element
  * @param	array		$flexformPointers: Array of flexform pointers - used internally, don't touch
  * @param	integer		$recursionDepth: Tracks the current level of recursion - used internall, don't touch.
  * @return	array		Array of flexform pointers
  * @access	public
  */
 function flexform_getFlexformPointersToSubElementsRecursively($table, $uid, &$flexformPointers, $recursionDepth = 0)
 {
     if (!is_array($flexformPointers)) {
         $flexformPointers = array();
     }
     $parentRecord = t3lib_BEfunc::getRecordWSOL($table, $uid, 'uid,pid,tx_templavoila_flex,tx_templavoila_ds,tx_templavoila_to' . ($table == 'pages' ? ',t3ver_swapmode' : ''));
     $flexFieldArr = t3lib_div::xml2array($parentRecord['tx_templavoila_flex']);
     $expandedDataStructure = $this->ds_getExpandedDataStructure($table, $parentRecord);
     if (is_array($flexFieldArr['data'])) {
         foreach ($flexFieldArr['data'] as $sheetKey => $languagesArr) {
             if (is_array($languagesArr)) {
                 foreach ($languagesArr as $languageKey => $fieldsArr) {
                     if (is_array($fieldsArr)) {
                         foreach ($fieldsArr as $fieldName => $valuesArr) {
                             if (is_array($valuesArr)) {
                                 foreach ($valuesArr as $valueName => $value) {
                                     if ($expandedDataStructure[$sheetKey]['ROOT']['el'][$fieldName]['tx_templavoila']['eType'] == 'ce') {
                                         $valueItems = t3lib_div::intExplode(',', $value);
                                         if (is_array($valueItems)) {
                                             $position = 1;
                                             foreach ($valueItems as $subElementUid) {
                                                 if ($subElementUid > 0) {
                                                     $flexformPointers[] = array('table' => $table, 'uid' => $uid, 'sheet' => $sheetKey, 'sLang' => $languageKey, 'field' => $fieldName, 'vLang' => $valueName, 'position' => $position, 'targetCheckUid' => $subElementUid);
                                                     if ($recursionDepth < 100) {
                                                         $this->flexform_getFlexformPointersToSubElementsRecursively('tt_content', $subElementUid, $flexformPointers, $recursionDepth + 1);
                                                     }
                                                     $position++;
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $flexformPointers;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:51,代码来源:class.tx_templavoila_api.php

示例14: main

 /**
  * Creating the module output.
  *
  * @return	void
  */
 function main()
 {
     global $LANG, $BACK_PATH, $BE_USER;
     if ($this->page_id) {
         // Get record for element:
         $elRow = t3lib_BEfunc::getRecordWSOL($this->table, $this->moveUid);
         // Headerline: Icon, record title:
         $hline = t3lib_iconWorks::getSpriteIconForRecord($this->table, $elRow, array('id' => "c-recIcon", 'title' => htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($elRow, $this->table))));
         $hline .= t3lib_BEfunc::getRecordTitle($this->table, $elRow, TRUE);
         // Make-copy checkbox (clicking this will reload the page with the GET var makeCopy set differently):
         $onClick = 'window.location.href=\'' . t3lib_div::linkThisScript(array('makeCopy' => !$this->makeCopy)) . '\';';
         $hline .= '<br /><input type="hidden" name="makeCopy" value="0" /><input type="checkbox" name="makeCopy" id="makeCopy" value="1"' . ($this->makeCopy ? ' checked="checked"' : '') . ' onclick="' . htmlspecialchars($onClick) . '" /> <label for="makeCopy">' . $LANG->getLL('makeCopy', 1) . '</label>';
         // Add the header-content to the module content:
         $this->content .= $this->doc->section($LANG->getLL('moveElement') . ':', $hline, 0, 1);
         $this->content .= $this->doc->spacer(20);
         // Reset variable to pick up the module content in:
         $code = '';
         // IF the table is "pages":
         if ((string) $this->table == 'pages') {
             // Get page record (if accessible):
             $pageinfo = t3lib_BEfunc::readPageAccess($this->page_id, $this->perms_clause);
             if (is_array($pageinfo) && $BE_USER->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
                 // Initialize the position map:
                 $posMap = t3lib_div::makeInstance('ext_posMap_pages');
                 $posMap->moveOrCopy = $this->makeCopy ? 'copy' : 'move';
                 // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page).
                 if ($pageinfo['pid']) {
                     $pidPageInfo = t3lib_BEfunc::readPageAccess($pageinfo['pid'], $this->perms_clause);
                     if (is_array($pidPageInfo)) {
                         if ($BE_USER->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
                             $code .= '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-up') . t3lib_BEfunc::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                         } else {
                             $code .= t3lib_iconWorks::getSpriteIconForRecord('pages', $pidPageInfo) . t3lib_BEfunc::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                         }
                     }
                 }
                 // Create the position tree:
                 $code .= $posMap->positionTree($this->page_id, $pageinfo, $this->perms_clause, $this->R_URI);
             }
         }
         // IF the table is "tt_content":
         if ((string) $this->table == 'tt_content') {
             // First, get the record:
             $tt_content_rec = t3lib_BEfunc::getRecord('tt_content', $this->moveUid);
             // ?
             if (!$this->input_moveUid) {
                 $this->page_id = $tt_content_rec['pid'];
             }
             // Checking if the parent page is readable:
             $pageinfo = t3lib_BEfunc::readPageAccess($this->page_id, $this->perms_clause);
             if (is_array($pageinfo) && $BE_USER->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
                 // Initialize the position map:
                 $posMap = t3lib_div::makeInstance('ext_posMap_tt_content');
                 $posMap->moveOrCopy = $this->makeCopy ? 'copy' : 'move';
                 $posMap->cur_sys_language = $this->sys_language;
                 // Headerline for the parent page: Icon, record title:
                 $hline = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageinfo, array('title' => htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($pageinfo, 'pages'))));
                 $hline .= t3lib_BEfunc::getRecordTitle('pages', $pageinfo, TRUE);
                 // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
                 $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->page_id, 'mod.SHARED');
                 // SHARED page-TSconfig settings.
                 $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']), '') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
                 $colPosList = implode(',', array_unique(t3lib_div::intExplode(',', $colPosList)));
                 // Removing duplicates, if any
                 // Adding parent page-header and the content element columns from position-map:
                 $code = $hline . '<br />';
                 $code .= $posMap->printContentElementColumns($this->page_id, $this->moveUid, $colPosList, 1, $this->R_URI);
                 // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page).
                 $code .= '<br />';
                 $code .= '<br />';
                 if ($pageinfo['pid']) {
                     $pidPageInfo = t3lib_BEfunc::readPageAccess($pageinfo['pid'], $this->perms_clause);
                     if (is_array($pidPageInfo)) {
                         if ($BE_USER->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
                             $code .= '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-up') . t3lib_BEfunc::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                         } else {
                             $code .= t3lib_iconWorks::getSpriteIconForRecord('pages', $pidPageInfo) . t3lib_BEfunc::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                         }
                     }
                 }
                 // Create the position tree (for pages):
                 $code .= $posMap->positionTree($this->page_id, $pageinfo, $this->perms_clause, $this->R_URI);
             }
         }
         // Add the $code content as a new section to the module:
         $this->content .= $this->doc->section($LANG->getLL('selectPositionOfElement') . ':', $code, 0, 1);
     }
     // Setting up the buttons and markers for docheader
     $docHeaderButtons = $this->getButtons();
     $markers['CSH'] = $docHeaderButtons['csh'];
     $markers['CONTENT'] = $this->content;
     // Build the <body> for the module
     $this->content = $this->doc->startPage($LANG->getLL('movingElement'));
     $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     $this->content .= $this->doc->endPage();
//.........这里部分代码省略.........
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:move_el.php

示例15: createCommaSeparatedRelation

 /**
  * Creates an n:1 relation using a comma-separated list of UIDs.
  *
  * @param array &$data
  *        the model data to process, will be modified
  * @param string $key
  *        the key of the data item for which the relation should be created, must not be empty
  * @param Tx_Oelib_Model $model the model to create the relation for
  *
  * @return void
  */
 private function createCommaSeparatedRelation(array &$data, $key, Tx_Oelib_Model $model)
 {
     /** @var Tx_Oelib_List $list */
     $list = t3lib_div::makeInstance('Tx_Oelib_List');
     $list->setParentModel($model);
     $uidList = isset($data[$key]) ? trim($data[$key]) : '';
     if ($uidList !== '') {
         $mapper = Tx_Oelib_MapperRegistry::get($this->relations[$key]);
         $uids = t3lib_div::intExplode(',', $uidList);
         foreach ($uids as $uid) {
             // Some relations might have a junk 0 in it. We ignore it to avoid crashing.
             if ($uid === 0) {
                 continue;
             }
             $list->add($mapper->find($uid));
         }
     }
     $data[$key] = $list;
 }
开发者ID:Konafets,项目名称:oelib,代码行数:30,代码来源:DataMapper.php


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