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


PHP JoinPointInterface::getMethodArgument方法代码示例

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


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

示例1: 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

示例2: catchAddAttribute

 /**
  * This changes how TagBuilder->addAttribute() method works.
  * When attribute's value is NULL or FALSE, it does *unset* the value.
  * Otherwise addAttribute() method is called as usually.
  *
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
  * @Flow\Around("method(TYPO3\Fluid\Core\ViewHelper\TagBuilder->addAttribute())")
  * @return void
  */
 public function catchAddAttribute(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     if (null === $joinPoint->getMethodArgument('attributeValue') || false === $joinPoint->getMethodArgument('attributeValue')) {
         /** @var \TYPO3\Fluid\Core\ViewHelper\TagBuilder $tagBuilder */
         $tagBuilder = $joinPoint->getProxy();
         $tagBuilder->removeAttribute($joinPoint->getMethodArgument('attributeName'));
     } else {
         $joinPoint->getAdviceChain()->proceed($joinPoint);
     }
 }
开发者ID:simonschaufi,项目名称:M12.Foundation,代码行数:19,代码来源:TagBuilderAspect.php

示例3: departmentNameChanged

 /**
  * Check if department of logged in User match with department property of page node and hide this node if true
  *
  * @param \TYPO3\Flow\AOP\JoinPointInterface $joinPoint
  * @Flow\After("method(TYPO3\Neos\EventLog\Integrations\TYPO3CRIntegrationService->afterNodePublishing(NodeInterface $node, $propertyName, $oldValue, $newValue))")
  * @return boolean
  */
 public function departmentNameChanged($joinPoint)
 {
     if ($joinPoint->getMethodArgument('node')->hasProperty("departmentName")) {
         // flush node caches after department change
         foreach ($joinPoint->getMethodArgument('node')->getChildNodes() as $childnode) {
             $childnode->getContext()->getFirstLevelNodeCache()->flush();
         }
         $joinPoint->getMethodArgument('node')->getContext()->getFirstLevelNodeCache()->flush();
     }
 }
开发者ID:phluzern,项目名称:sites.phlu.ch,代码行数:17,代码来源:PhluNodeEditAspect.php

示例4: replaceNodeData

 /**
  * @Flow\Around("method(TYPO3\TYPO3CR\Domain\Model\Workspace->replaceNodeData())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
  * @return string The result of the target method if it has not been intercepted
  */
 public function replaceNodeData(JoinPointInterface $joinPoint)
 {
     /** @var Node $node */
     $node = $joinPoint->getMethodArgument('node');
     if ($node->isRemoved()) {
         // If the node is supposed to be removed, we do not need to do anything as the node will be gone anyways afterwards
         return $joinPoint->getAdviceChain()->proceed($joinPoint);
     }
     /** @var NodeData $targetNodeData */
     $targetNodeData = $joinPoint->getMethodArgument('targetNodeData');
     $commentsForToBePublishedNode = $this->extractComments($node);
     $commentsInTargetWorkspace = $this->extractComments($targetNodeData);
     // Call original Method
     $result = $joinPoint->getAdviceChain()->proceed($joinPoint);
     if (count($commentsForToBePublishedNode) == 0 && count($commentsInTargetWorkspace) == 0) {
         return $result;
     }
     // After publishing the node, we update the published node with the merged comments. We cannot do this
     // before publishing, as otherwise the NodeData which is underneath the to-be-published Node will be "dirty"
     // and marked as "removed" at the same time, leading to a CR crash. This also is a CR bug which only occurs in
     // very rare occasions.
     $mergedComments = $this->mergeComments($commentsForToBePublishedNode, $commentsInTargetWorkspace);
     $this->writeComments($node, $mergedComments);
     return $result;
 }
开发者ID:sandstorm,项目名称:contentcomments,代码行数:30,代码来源:WorkspaceAspect.php

示例5: rewriteSiteAssetCollection

 /**
  * @Flow\Before("method(TYPO3\Neos\Controller\Backend\ContentController->uploadAssetAction())")
  * @param JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function rewriteSiteAssetCollection(JoinPointInterface $joinPoint)
 {
     if ($this->lookupNodeFilter === NULL || $this->lookupPropertyName === NULL) {
         return;
     }
     /** @var ContentController $contentController */
     $contentController = $joinPoint->getProxy();
     /** @var ActionRequest $actionRequest */
     $actionRequest = ObjectAccess::getProperty($contentController, 'request', TRUE);
     $nodeContextPath = $actionRequest->getInternalArgument('__node');
     if ($nodeContextPath === NULL) {
         return;
     }
     $node = $this->propertyMapper->convert($nodeContextPath, NodeInterface::class);
     $flowQuery = new FlowQuery(array($node));
     /** @var NodeInterface $documentNode */
     $documentNode = $flowQuery->closest($this->lookupNodeFilter)->get(0);
     if (!$documentNode->hasProperty($this->lookupPropertyName)) {
         return;
     }
     /** @var AssetCollection $assetCollection */
     $assetCollection = $this->assetCollectionRepository->findByIdentifier($documentNode->getProperty($this->lookupPropertyName));
     if ($assetCollection === NULL) {
         return;
     }
     /** @var Asset $asset */
     $asset = $joinPoint->getMethodArgument('asset');
     $assetCollection->addAsset($asset);
     $this->assetCollectionRepository->update($assetCollection);
 }
开发者ID:bwaidelich,项目名称:Wwwision.AssetConstraints,代码行数:35,代码来源:ContentControllerAspect.php

示例6: 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

示例7: registerDisableContentCache

 /**
  * Advice for a disabled content cache (e.g. because an exception was handled)
  *
  * @Flow\AfterReturning("method(TYPO3\TypoScript\Core\Cache\RuntimeContentCache->setEnableContentCache())")
  * @param JoinPointInterface $joinPoint
  */
 public function registerDisableContentCache(JoinPointInterface $joinPoint)
 {
     $enableContentCache = $joinPoint->getMethodArgument('enableContentCache');
     if ($enableContentCache !== TRUE) {
         $this->evaluatedUncached = TRUE;
     }
 }
开发者ID:johannessteu,项目名称:MOC.Varnish,代码行数:13,代码来源:ContentCacheAspect.php

示例8: aroundConvertRequestPathToNodeAspect

 /**
  * @Flow\Around("method(TYPO3\Neos\Routing\FrontendNodeRoutePartHandler->convertRequestPathToNode())")
  *
  * @param \TYPO3\FLOW\AOP\JoinPointInterface $joinPoint the join point
  *
  * @return mixed
  */
 public function aroundConvertRequestPathToNodeAspect($joinPoint)
 {
     if ($this->nodeNotFoundService->isEnabled()) {
         /** @var NodeInterface $node */
         $requestPath = $joinPoint->getMethodArgument('requestPath');
         try {
             return $joinPoint->getAdviceChain()->proceed($joinPoint);
         } catch (InvalidRequestPathException $e) {
             $defaultUriSegment = $this->nodeNotFoundService->getDefaultUriSegment();
             $requestPath = $defaultUriSegment . $this->nodeNotFoundService->get404NodeUriForDimensionUriSegment($defaultUriSegment);
             $joinPoint->setMethodArgument("requestPath", $requestPath);
             return $joinPoint->getAdviceChain()->proceed($joinPoint);
         } catch (NoSuchDimensionValueException $e) {
             $defaultUriSegment = $this->nodeNotFoundService->getDefaultUriSegment();
             $requestPath = $defaultUriSegment . $this->nodeNotFoundService->get404NodeUriForDimensionUriSegment($defaultUriSegment);
             $joinPoint->setMethodArgument("requestPath", $requestPath);
             return $joinPoint->getAdviceChain()->proceed($joinPoint);
         } catch (NoSuchNodeException $e) {
             $dimensionUriSegment = strstr($requestPath, "/", true);
             if (count($this->contentDimensionPresetSource->getAllPresets()) > 0) {
                 $requestPath = $dimensionUriSegment . "/" . $this->nodeNotFoundService->get404NodeUriForDimensionUriSegment($dimensionUriSegment);
             } else {
                 $requestPath = $this->nodeNotFoundService->get404NodeUriForDimensionUriSegment('');
             }
             $joinPoint->setMethodArgument("requestPath", $requestPath);
             return $joinPoint->getAdviceChain()->proceed($joinPoint);
         }
     } else {
         // execute the original code
         return $joinPoint->getAdviceChain()->proceed($joinPoint);
     }
 }
开发者ID:networkteam,项目名称:TechDivision.NotFound,代码行数:39,代码来源:FrontendNodeRoutePartHandlerAspect.php

示例9: filterNodeByAllowedSites

 /**
  * Check if nodetype is in allowed sites (apply node context by filtering out not allowed node types)
  *
  * @param \TYPO3\Flow\AOP\JoinPointInterface $joinPoint
  * @Flow\Around("method(TYPO3\TYPO3CR\Domain\Factory\NodeFactory->filterNodeByContext(.*))")
  * @return \TYPO3\TYPO3CR\Domain\Model\NodeInterface|NULL
  */
 public function filterNodeByAllowedSites($joinPoint)
 {
     if ($this->isNodeTypeInAllowedSite($joinPoint->getMethodArgument('node')->getNodeType()) == FALSE) {
         return null;
     }
     $result = $joinPoint->getAdviceChain()->proceed($joinPoint);
     return $result;
 }
开发者ID:phluzern,项目名称:PHLU.NodeTypes,代码行数:15,代码来源:NodeTypesAllowedSitesAspect.php

示例10: logDestroy

 /**
  * Logs calls of destroy()
  *
  * @Flow\Before("within(TYPO3\Flow\Session\SessionInterface) && method(.*->destroy())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current joinpoint
  * @return mixed The result of the target method if it has not been intercepted
  */
 public function logDestroy(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     $session = $joinPoint->getProxy();
     if ($session->isStarted()) {
         $reason = $joinPoint->isMethodArgument('reason') ? $joinPoint->getMethodArgument('reason') : 'no reason given';
         $this->systemLogger->log(sprintf('%s: Destroyed session with id %s: %s', $this->getClassName($joinPoint), $joinPoint->getProxy()->getId(), $reason), LOG_INFO);
     }
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:15,代码来源:LoggingAspect.php

示例11: 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

示例12: registerDisableContentCache

 /**
  * Advice for a disabled content cache (e.g. because an exception was handled)
  *
  * @Flow\AfterReturning("method(TYPO3\TypoScript\Core\Cache\RuntimeContentCache->setEnableContentCache())")
  * @param JoinPointInterface $joinPoint
  */
 public function registerDisableContentCache(JoinPointInterface $joinPoint)
 {
     $enableContentCache = $joinPoint->getMethodArgument('enableContentCache');
     if ($enableContentCache !== TRUE) {
         $this->logger->log('Varnish cache disabled due content cache being disabled (e.g. because an exception was handled)', LOG_DEBUG);
         $this->evaluatedUncached = TRUE;
     }
 }
开发者ID:christophlehmann,项目名称:MOC.Varnish,代码行数:14,代码来源:ContentCacheAspect.php

示例13: preventContentElementWraps

 /**
  * Makes sure that XML content (such as the RSS feed) is not wrapped with divs.
  *
  * @param JoinPointInterface $joinPoint
  * @return string
  * @Flow\Around("method(TYPO3\Neos\Service\ContentElementWrappingService->wrapContentObject())")
  */
 public function preventContentElementWraps(JoinPointInterface $joinPoint)
 {
     $content = $joinPoint->getMethodArgument('content');
     if (substr($content, 0, 5) === '<?xml') {
         return $content;
     }
     return $joinPoint->getAdviceChain()->proceed($joinPoint);
 }
开发者ID:rotespferd,项目名称:Mariansievers.Plugin.News,代码行数:15,代码来源:RenderingFixingAspect.php

示例14: convertNodeToContextPathForRouting

 /**
  * Convert the object to its context path, if we deal with TYPO3CR nodes.
  *
  * @Flow\Around("method(TYPO3\Flow\Persistence\AbstractPersistenceManager->convertObjectToIdentityArray())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint the joinpoint
  * @return string|array the context path to be used for routing
  */
 public function convertNodeToContextPathForRouting(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     $objectArgument = $joinPoint->getMethodArgument('object');
     if ($objectArgument instanceof NodeInterface) {
         return $objectArgument->getContextPath();
     } else {
         return $joinPoint->getAdviceChain()->proceed($joinPoint);
     }
 }
开发者ID:radmiraal,项目名称:neos-development-collection,代码行数:16,代码来源:NodeIdentityConverterAspect.php

示例15: dontResolveShortcutsInFrontend

 /**
  * @Flow\Around("method(TYPO3\Neos\Controller\Frontend\NodeController->handleShortcutNode())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function dontResolveShortcutsInFrontend(JoinPointInterface $joinPoint)
 {
     $node = $joinPoint->getMethodArgument('node');
     if ($node instanceof NodeInterface) {
         if (in_array($node->getProperty('targetMode'), $this->legitShortcutTargets)) {
             $joinPoint->getAdviceChain()->proceed($joinPoint);
         }
     }
 }
开发者ID:Weissheiten,项目名称:Sfi.Shared,代码行数:14,代码来源:AlterResolveShortcutsAspect.php


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