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


PHP JoinPointInterface::setMethodArgument方法代码示例

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


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

示例1: dontResolveShortcuts

 /**
  * @Flow\Before("method(TYPO3\Neos\Service\LinkingService->createNodeUri())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function dontResolveShortcuts(JoinPointInterface $joinPoint)
 {
     $node = $joinPoint->getMethodArgument('node');
     if ($node instanceof NodeInterface) {
         if (!in_array($node->getProperty('targetMode'), $this->legitShortcutTargets)) {
             $joinPoint->setMethodArgument('resolveShortcuts', FALSE);
         }
     } else {
         $joinPoint->setMethodArgument('resolveShortcuts', FALSE);
     }
 }
开发者ID:Weissheiten,项目名称:Sfi.Shared,代码行数:16,代码来源:AlterResolveShortcutsAspect.php

示例2: addCurrentNodeIdentifier

 /**
  * Add the current node and all parent identifiers to be used for cache entry tagging
  *
  * @Flow\Before("method(TYPO3\Flow\Mvc\Routing\RouterCachingService->extractUuids())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function addCurrentNodeIdentifier(JoinPointInterface $joinPoint)
 {
     $values = $joinPoint->getMethodArgument('values');
     if (!isset($values['node']) || strpos($values['node'], '@') === false) {
         return;
     }
     // Build context explicitly without authorization checks because the security context isn't available yet
     // anyway and any Entity Privilege targeted on Workspace would fail at this point:
     $this->securityContext->withoutAuthorizationChecks(function () use($joinPoint, $values) {
         $contextPathPieces = NodePaths::explodeContextPath($values['node']);
         $context = $this->contextFactory->create(['workspaceName' => $contextPathPieces['workspaceName'], 'dimensions' => $contextPathPieces['dimensions'], 'invisibleContentShown' => true]);
         $node = $context->getNode($contextPathPieces['nodePath']);
         if (!$node instanceof NodeInterface) {
             return;
         }
         $values['node-identifier'] = $node->getIdentifier();
         $node = $node->getParent();
         $values['node-parent-identifier'] = array();
         while ($node !== null) {
             $values['node-parent-identifier'][] = $node->getIdentifier();
             $node = $node->getParent();
         }
         $joinPoint->setMethodArgument('values', $values);
     });
 }
开发者ID:mgoldbeck,项目名称:neos-development-collection,代码行数:32,代码来源:RouteCacheAspect.php

示例3: rewriteJsonApiOrgMediaTypeToJson

 /**
  * @Flow\Around("within(TYPO3\Flow\Property\TypeConverter\MediaTypeConverterInterface) && method(.*->convertMediaType())")
  * @param JoinPointInterface $joinPoint The current joinpoint
  * @return mixed
  */
 public function rewriteJsonApiOrgMediaTypeToJson(JoinPointInterface $joinPoint)
 {
     $mediaType = $joinPoint->getMethodArgument('mediaType');
     if (strpos($mediaType, 'application/vnd.api+json') !== false) {
         $joinPoint->setMethodArgument('mediaType', 'application/json');
     }
     return $joinPoint->getAdviceChain()->proceed($joinPoint);
 }
开发者ID:netlogix,项目名称:jsonapiorg,代码行数:13,代码来源:TreatJsonApiOrgAsJsonMediaTypeAspect.php

示例4: enrichNodeTypeConfiguration

 /**
  * @Flow\Around("method(TYPO3\TYPO3CR\Domain\Model\NodeType->__construct())")
  * @return void
  */
 public function enrichNodeTypeConfiguration(JoinPointInterface $joinPoint)
 {
     $configuration = $joinPoint->getMethodArgument('configuration');
     $nodeTypeName = $joinPoint->getMethodArgument('name');
     $this->addEditorDefaultsToNodeTypeConfiguration($nodeTypeName, $configuration);
     $this->addLabelsToNodeTypeConfiguration($nodeTypeName, $configuration);
     $joinPoint->setMethodArgument('configuration', $configuration);
     $joinPoint->getAdviceChain()->proceed($joinPoint);
 }
开发者ID:testbird,项目名称:neos-development-collection,代码行数:13,代码来源:NodeTypeConfigurationEnrichmentAspect.php

示例5: convertRoutePartToLowerCase

 /**
  * @Flow\Before("method(TYPO3\Neos\Routing\FrontendNodeRoutePartHandler->matchValue())")
  * @return void
  */
 public function convertRoutePartToLowerCase(\TYPO3\Flow\AOP\JoinPointInterface $joinPoint)
 {
     $requestPath = $joinPoint->getMethodArgument('requestPath');
     if (strpos($requestPath, 'user')) {
         $parts = explode("user", $requestPath);
         $lowerCaseRequestPath = strtolower($parts[0]) . "user" . $parts[1];
     } else {
         $lowerCaseRequestPath = strtolower($requestPath);
     }
     $joinPoint->setMethodArgument('requestPath', $lowerCaseRequestPath);
 }
开发者ID:patrickreck,项目名称:Swisscom.Neos.CaseInsensitiveUrls,代码行数:15,代码来源:LowercaseRoutePartAspect.php

示例6: addCurrentNodeIdentifier

 /**
  * Add the current node identifier to be used for cache entry tagging
  *
  * @Flow\Before("method(TYPO3\Flow\Mvc\Routing\RouterCachingService->extractUuids())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function addCurrentNodeIdentifier(JoinPointInterface $joinPoint)
 {
     $values = $joinPoint->getMethodArgument('values');
     if (!isset($values['node']) || strpos($values['node'], '@') === false) {
         return;
     }
     list($nodePath, $contextArguments) = explode('@', $values['node']);
     $context = $this->getContext($contextArguments);
     $node = $context->getNode($nodePath);
     if ($node instanceof NodeInterface) {
         $values['node-identifier'] = $node->getIdentifier();
         $joinPoint->setMethodArgument('values', $values);
     }
 }
开发者ID:reinis-zumbergs,项目名称:neos-development-collection,代码行数:21,代码来源:RouteCacheAspect.php

示例7: changeNameArgumentAdvice

 /**
  * @Flow\Around("method(public TYPO3\Flow\Tests\Functional\Aop\Fixtures\TargetClass01->greet())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
  * @return string
  */
 public function changeNameArgumentAdvice(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     if ($joinPoint->getMethodArgument('name') === 'Andi') {
         $joinPoint->setMethodArgument('name', 'Robert');
     }
     return $joinPoint->getAdviceChain()->proceed($joinPoint);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:12,代码来源:BaseFunctionalityTestingAspect.php


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