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


PHP ArrayUtility::intersectRecursive方法代码示例

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


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

示例1: intersectRecursiveCalculatesExpectedResult

 /**
  * @test
  * @param array $source
  * @param array $mask
  * @param array $expected
  * @dataProvider intersectRecursiveCalculatesExpectedResultDataProvider
  */
 public function intersectRecursiveCalculatesExpectedResult(array $source, array $mask, array $expected)
 {
     $this->assertSame($expected, ArrayUtility::intersectRecursive($source, $mask));
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:11,代码来源:ArrayUtilityTest.php

示例2: getPreserveGetVars

 /**
  * Add additional parameters for links according to TS setting preserveGETvars.
  * Possible values are "all" or a comma separated list of allowed GET-vars.
  * Supports multi-dimensional GET-vars.
  * Some hardcoded values are dropped.
  *
  * @return string additionalParams-string
  */
 protected function getPreserveGetVars()
 {
     $getVars = GeneralUtility::_GET();
     unset($getVars['id'], $getVars['no_cache'], $getVars['logintype'], $getVars['redirect_url'], $getVars['cHash'], $getVars[$this->prefixId]);
     if ($this->conf['preserveGETvars'] === 'all') {
         $preserveQueryParts = $getVars;
     } else {
         $preserveQueryParts = GeneralUtility::trimExplode(',', $this->conf['preserveGETvars']);
         $preserveQueryParts = GeneralUtility::explodeUrl2Array(implode('=1&', $preserveQueryParts) . '=1', TRUE);
         $preserveQueryParts = \TYPO3\CMS\Core\Utility\ArrayUtility::intersectRecursive($getVars, $preserveQueryParts);
     }
     $parameters = GeneralUtility::implodeArrayForUrl('', $preserveQueryParts);
     return $parameters;
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:22,代码来源:FrontendLoginController.php

示例3: main


//.........这里部分代码省略.........
         case 0:
             $theVar = $GLOBALS['TYPO3_CONF_VARS'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TYPO3_CONF_VARS';
             break;
         case 1:
             $theVar = $GLOBALS['TCA'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TCA';
             break;
         case 2:
             $theVar = $GLOBALS['TCA_DESCR'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TCA_DESCR';
             break;
         case 3:
             $theVar = $GLOBALS['TYPO3_LOADED_EXT'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TYPO3_LOADED_EXT';
             break;
         case 4:
             $theVar = $GLOBALS['T3_SERVICES'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$T3_SERVICES';
             break;
         case 5:
             $theVar = $GLOBALS['TBE_MODULES'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TBE_MODULES';
             break;
         case 6:
             $theVar = $GLOBALS['TBE_MODULES_EXT'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TBE_MODULES_EXT';
             break;
         case 7:
             $theVar = $GLOBALS['TBE_STYLES'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TBE_STYLES';
             break;
         case 8:
             $theVar = $GLOBALS['BE_USER']->uc;
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$BE_USER->uc';
             break;
         case 9:
             $theVar = $GLOBALS['TYPO3_USER_SETTINGS'];
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = '$TYPO3_USER_SETTINGS';
             break;
         case 10:
             $router = GeneralUtility::makeInstance(Router::class);
             $routes = $router->getRoutes();
             $theVar = [];
             foreach ($routes as $identifier => $route) {
                 $theVar[$identifier] = ['path' => $route->getPath(), 'options' => $route->getOptions()];
             }
             ArrayUtility::naturalKeySortRecursive($theVar);
             $arrayBrowser->varName = 'BackendRoutes';
             break;
         default:
             $theVar = [];
     }
     // Update node:
     $update = 0;
     $node = GeneralUtility::_GET('node');
     // If any plus-signs were clicked, it's registered.
     if (is_array($node)) {
         $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']] = $arrayBrowser->depthKeys($node, $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']]);
         $update = 1;
     }
     if ($update) {
         $this->getBackendUser()->pushModuleData($this->moduleName, $this->MOD_SETTINGS);
     }
     $arrayBrowser->dontLinkVar = true;
     $arrayBrowser->depthKeys = $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']];
     $arrayBrowser->regexMode = $this->MOD_SETTINGS['regexsearch'];
     $arrayBrowser->fixedLgd = $this->MOD_SETTINGS['fixedLgd'];
     $arrayBrowser->searchKeysToo = true;
     // If any POST-vars are send, update the condition array
     if (GeneralUtility::_POST('search') && trim($search_field)) {
         $arrayBrowser->depthKeys = $arrayBrowser->getSearchKeys($theVar, '', $search_field, []);
     }
     // mask sensitive information
     $varName = trim($arrayBrowser->varName, '$');
     if (isset($this->blindedConfigurationOptions[$varName])) {
         ArrayUtility::mergeRecursiveWithOverrule($theVar, ArrayUtility::intersectRecursive($this->blindedConfigurationOptions[$varName], $theVar));
     }
     $tree = $arrayBrowser->tree($theVar, '', '');
     $this->view->assign('tree', $tree);
     // Setting up the shortcut button for docheader
     $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
     // Shortcut
     $shortcutButton = $buttonBar->makeShortcutButton()->setModuleName($this->moduleName)->setDisplayName($this->MOD_MENU['function'][$this->MOD_SETTINGS['function']])->setSetVariables(['function']);
     $buttonBar->addButton($shortcutButton);
     $this->getModuleMenu();
     $this->content = '<form action="" id="ConfigurationView" method="post">';
     $this->content .= $this->view->render();
     $this->content .= '</form>';
 }
开发者ID:,项目名称:,代码行数:101,代码来源:


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