repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
neos/neos-ui | Classes/Domain/Model/Changes/Remove.php | Remove.apply | public function apply()
{
if ($this->canApply()) {
$node = $this->getSubject();
$node->remove();
$this->updateWorkspaceInfo();
$removeNode = new RemoveNode();
$removeNode->setNode($node);
$this->feedbackCollection->add($removeNode);
... | php | public function apply()
{
if ($this->canApply()) {
$node = $this->getSubject();
$node->remove();
$this->updateWorkspaceInfo();
$removeNode = new RemoveNode();
$removeNode->setNode($node);
$this->feedbackCollection->add($removeNode);
... | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
";",
"$",
"node",
"->",
"remove",
"(",
")",
";",
"$",
"this",
"->",
"update... | Applies this change
@return void | [
"Applies",
"this",
"change"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/Remove.php#L38-L56 |
neos/neos-ui | Migrations/Code/Version20180907103800.php | Version20180907103800.transformAlohaFormat | protected function transformAlohaFormat($aloha)
{
$editorOptions = [
'formatting' => []
];
if (isset($aloha['format']) && is_array($aloha['format'])) {
$editorOptions['formatting'] = array_merge($editorOptions['formatting'], $aloha['format']);
}
if (is... | php | protected function transformAlohaFormat($aloha)
{
$editorOptions = [
'formatting' => []
];
if (isset($aloha['format']) && is_array($aloha['format'])) {
$editorOptions['formatting'] = array_merge($editorOptions['formatting'], $aloha['format']);
}
if (is... | [
"protected",
"function",
"transformAlohaFormat",
"(",
"$",
"aloha",
")",
"{",
"$",
"editorOptions",
"=",
"[",
"'formatting'",
"=>",
"[",
"]",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"aloha",
"[",
"'format'",
"]",
")",
"&&",
"is_array",
"(",
"$",
"aloha... | Takes legacy aloha formatting and return editorOptions
@param array $aloha
@return array $editorOptions | [
"Takes",
"legacy",
"aloha",
"formatting",
"and",
"return",
"editorOptions"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Migrations/Code/Version20180907103800.php#L57-L95 |
neos/neos-ui | Classes/FlowQueryOperations/NeosUiFilteredChildrenOperation.php | NeosUiFilteredChildrenOperation.evaluate | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$output = [];
$outputNodePaths = [];
$filter = isset($arguments[0]) ? $arguments[0] : null;
/** @var NodeInterface $contextNode */
foreach ($flowQuery->getContext() as $contextNode) {
/** @var No... | php | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$output = [];
$outputNodePaths = [];
$filter = isset($arguments[0]) ? $arguments[0] : null;
/** @var NodeInterface $contextNode */
foreach ($flowQuery->getContext() as $contextNode) {
/** @var No... | [
"public",
"function",
"evaluate",
"(",
"FlowQuery",
"$",
"flowQuery",
",",
"array",
"$",
"arguments",
")",
"{",
"$",
"output",
"=",
"[",
"]",
";",
"$",
"outputNodePaths",
"=",
"[",
"]",
";",
"$",
"filter",
"=",
"isset",
"(",
"$",
"arguments",
"[",
"0... | {@inheritdoc}
@param FlowQuery $flowQuery the FlowQuery object
@param array $arguments the arguments for this operation
@return void | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/FlowQueryOperations/NeosUiFilteredChildrenOperation.php#L57-L75 |
neos/neos-ui | Classes/Domain/Model/Changes/Property.php | Property.canApply | public function canApply()
{
$nodeType = $this->getSubject()->getNodeType();
$propertyName = $this->getPropertyName();
$nodeTypeProperties = $nodeType->getProperties();
if (!isset($nodeTypeProperties[$propertyName])) {
return false;
}
if (isset($nodeType... | php | public function canApply()
{
$nodeType = $this->getSubject()->getNodeType();
$propertyName = $this->getPropertyName();
$nodeTypeProperties = $nodeType->getProperties();
if (!isset($nodeTypeProperties[$propertyName])) {
return false;
}
if (isset($nodeType... | [
"public",
"function",
"canApply",
"(",
")",
"{",
"$",
"nodeType",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
"->",
"getNodeType",
"(",
")",
";",
"$",
"propertyName",
"=",
"$",
"this",
"->",
"getPropertyName",
"(",
")",
";",
"$",
"nodeTypeProperties"... | Checks whether this change can be applied to the subject
@return boolean | [
"Checks",
"whether",
"this",
"change",
"can",
"be",
"applied",
"to",
"the",
"subject"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/Property.php#L173-L195 |
neos/neos-ui | Classes/Domain/Model/Changes/Property.php | Property.apply | public function apply()
{
if ($this->canApply()) {
$node = $this->getSubject();
$propertyName = $this->getPropertyName();
$value = $this->nodePropertyConversionService->convert(
$node->getNodeType(),
$propertyName,
$this->ge... | php | public function apply()
{
if ($this->canApply()) {
$node = $this->getSubject();
$propertyName = $this->getPropertyName();
$value = $this->nodePropertyConversionService->convert(
$node->getNodeType(),
$propertyName,
$this->ge... | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
";",
"$",
"propertyName",
"=",
"$",
"this",
"->",
"getPropertyName",
"(",
")",
... | Applies this change
@return void
@throws NodeTypeNotFoundException | [
"Applies",
"this",
"change"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/Property.php#L203-L252 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractMove.php | AbstractMove.finish | protected function finish(NodeInterface $node)
{
$removeNode = new RemoveNode();
$removeNode->setNode($node);
$this->feedbackCollection->add($removeNode);
// $this->getSubject() is the moved node at the NEW location!
parent::finish($this->getSubject());
} | php | protected function finish(NodeInterface $node)
{
$removeNode = new RemoveNode();
$removeNode->setNode($node);
$this->feedbackCollection->add($removeNode);
// $this->getSubject() is the moved node at the NEW location!
parent::finish($this->getSubject());
} | [
"protected",
"function",
"finish",
"(",
"NodeInterface",
"$",
"node",
")",
"{",
"$",
"removeNode",
"=",
"new",
"RemoveNode",
"(",
")",
";",
"$",
"removeNode",
"->",
"setNode",
"(",
"$",
"node",
")",
";",
"$",
"this",
"->",
"feedbackCollection",
"->",
"ad... | Perform finish tasks - needs to be called from inheriting class on `apply`
@param NodeInterface $node
@return void | [
"Perform",
"finish",
"tasks",
"-",
"needs",
"to",
"be",
"called",
"from",
"inheriting",
"class",
"on",
"apply"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractMove.php#L34-L43 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractMove.php | AbstractMove.nodeNameAvailableBelowNode | protected function nodeNameAvailableBelowNode(NodeInterface $parentNode, NodeInterface $node)
{
return $this->contentRepositoryNodeService->nodePathAvailableForNode($parentNode->getPath() . '/' . $node->getName(), $node);
} | php | protected function nodeNameAvailableBelowNode(NodeInterface $parentNode, NodeInterface $node)
{
return $this->contentRepositoryNodeService->nodePathAvailableForNode($parentNode->getPath() . '/' . $node->getName(), $node);
} | [
"protected",
"function",
"nodeNameAvailableBelowNode",
"(",
"NodeInterface",
"$",
"parentNode",
",",
"NodeInterface",
"$",
"node",
")",
"{",
"return",
"$",
"this",
"->",
"contentRepositoryNodeService",
"->",
"nodePathAvailableForNode",
"(",
"$",
"parentNode",
"->",
"g... | Returns true if the current name of $node is "free" below $parentNode
@param NodeInterface $parentNode
@param NodeInterface $node
@return bool | [
"Returns",
"true",
"if",
"the",
"current",
"name",
"of",
"$node",
"is",
"free",
"below",
"$parentNode"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractMove.php#L78-L81 |
neos/neos-ui | Classes/Domain/Model/FeedbackCollection.php | FeedbackCollection.add | public function add(FeedbackInterface $feedback)
{
foreach ($this->feedbacks as $value) {
if ($value->isSimilarTo($feedback)) {
return;
}
}
$this->feedbacks[] = $feedback;
} | php | public function add(FeedbackInterface $feedback)
{
foreach ($this->feedbacks as $value) {
if ($value->isSimilarTo($feedback)) {
return;
}
}
$this->feedbacks[] = $feedback;
} | [
"public",
"function",
"add",
"(",
"FeedbackInterface",
"$",
"feedback",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"feedbacks",
"as",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"->",
"isSimilarTo",
"(",
"$",
"feedback",
")",
")",
"{",
"return",... | Add feedback
@param FeedbackInterface $feedback
@return void | [
"Add",
"feedback"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/FeedbackCollection.php#L49-L58 |
neos/neos-ui | Classes/Domain/Model/FeedbackCollection.php | FeedbackCollection.jsonSerialize | public function jsonSerialize()
{
$feedbacks = [];
foreach ($this->feedbacks as $feedback) {
$feedbacks[] = $feedback->serialize($this->controllerContext);
}
return [
'timestamp' => new \DateTime(),
'feedbacks' => $feedbacks
];
} | php | public function jsonSerialize()
{
$feedbacks = [];
foreach ($this->feedbacks as $feedback) {
$feedbacks[] = $feedback->serialize($this->controllerContext);
}
return [
'timestamp' => new \DateTime(),
'feedbacks' => $feedbacks
];
} | [
"public",
"function",
"jsonSerialize",
"(",
")",
"{",
"$",
"feedbacks",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"feedbacks",
"as",
"$",
"feedback",
")",
"{",
"$",
"feedbacks",
"[",
"]",
"=",
"$",
"feedback",
"->",
"serialize",
"(",
"$"... | Serialize collection to `json_encode`able array
@return array | [
"Serialize",
"collection",
"to",
"json_encode",
"able",
"array"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/FeedbackCollection.php#L65-L77 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/UpdateNodeInfo.php | UpdateNodeInfo.isSimilarTo | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof UpdateNodeInfo) {
return false;
}
return $this->getNode()->getContextPath() === $feedback->getNode()->getContextPath();
} | php | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof UpdateNodeInfo) {
return false;
}
return $this->getNode()->getContextPath() === $feedback->getNode()->getContextPath();
} | [
"public",
"function",
"isSimilarTo",
"(",
"FeedbackInterface",
"$",
"feedback",
")",
"{",
"if",
"(",
"!",
"$",
"feedback",
"instanceof",
"UpdateNodeInfo",
")",
"{",
"return",
"false",
";",
"}",
"return",
"$",
"this",
"->",
"getNode",
"(",
")",
"->",
"getCo... | Checks whether this feedback is similar to another
@param FeedbackInterface $feedback
@return boolean | [
"Checks",
"whether",
"this",
"feedback",
"is",
"similar",
"to",
"another"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/UpdateNodeInfo.php#L93-L100 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/UpdateNodeInfo.php | UpdateNodeInfo.serializeNodeRecursively | public function serializeNodeRecursively(NodeInterface $node, ControllerContext $controllerContext)
{
$result = [
$node->getContextPath() => $this->nodeInfoHelper->renderNodeWithPropertiesAndChildrenInformation($node, $controllerContext)
];
if ($this->isRecursive === true) {
... | php | public function serializeNodeRecursively(NodeInterface $node, ControllerContext $controllerContext)
{
$result = [
$node->getContextPath() => $this->nodeInfoHelper->renderNodeWithPropertiesAndChildrenInformation($node, $controllerContext)
];
if ($this->isRecursive === true) {
... | [
"public",
"function",
"serializeNodeRecursively",
"(",
"NodeInterface",
"$",
"node",
",",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"$",
"result",
"=",
"[",
"$",
"node",
"->",
"getContextPath",
"(",
")",
"=>",
"$",
"this",
"->",
"nodeInfoHelper",
... | Serialize node and all child nodes
@param NodeInterface $node
@param ControllerContext $controllerContext
@return array | [
"Serialize",
"node",
"and",
"all",
"child",
"nodes"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/UpdateNodeInfo.php#L122-L135 |
neos/neos-ui | Classes/NodeCreationHandler/DocumentTitleNodeCreationHandler.php | DocumentTitleNodeCreationHandler.handle | public function handle(NodeInterface $node, array $data)
{
if ($node->getNodeType()->isOfType('Neos.Neos:Document')) {
if (isset($data['title'])) {
$node->setProperty('title', $data['title']);
}
$node->setProperty('uriPathSegment', $this->nodeUriPathSegmen... | php | public function handle(NodeInterface $node, array $data)
{
if ($node->getNodeType()->isOfType('Neos.Neos:Document')) {
if (isset($data['title'])) {
$node->setProperty('title', $data['title']);
}
$node->setProperty('uriPathSegment', $this->nodeUriPathSegmen... | [
"public",
"function",
"handle",
"(",
"NodeInterface",
"$",
"node",
",",
"array",
"$",
"data",
")",
"{",
"if",
"(",
"$",
"node",
"->",
"getNodeType",
"(",
")",
"->",
"isOfType",
"(",
"'Neos.Neos:Document'",
")",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
... | Set the node title for the newly created Document node
@param NodeInterface $node The newly created node
@param array $data incoming data from the creationDialog
@return void | [
"Set",
"the",
"node",
"title",
"for",
"the",
"newly",
"created",
"Document",
"node"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/NodeCreationHandler/DocumentTitleNodeCreationHandler.php#L33-L41 |
neos/neos-ui | Classes/Domain/Model/Changes/CopyAfter.php | CopyAfter.canApply | public function canApply()
{
$nodeType = $this->getSubject()->getNodeType();
return $this->getSiblingNode()->getParent()->isNodeTypeAllowedAsChildNode($nodeType);
} | php | public function canApply()
{
$nodeType = $this->getSubject()->getNodeType();
return $this->getSiblingNode()->getParent()->isNodeTypeAllowedAsChildNode($nodeType);
} | [
"public",
"function",
"canApply",
"(",
")",
"{",
"$",
"nodeType",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
"->",
"getNodeType",
"(",
")",
";",
"return",
"$",
"this",
"->",
"getSiblingNode",
"(",
")",
"->",
"getParent",
"(",
")",
"->",
"isNodeTyp... | "Subject" is the to-be-copied node; the "sibling" node is the node after which the "Subject" should be copied.
@return boolean | [
"Subject",
"is",
"the",
"to",
"-",
"be",
"-",
"copied",
"node",
";",
"the",
"sibling",
"node",
"is",
"the",
"node",
"after",
"which",
"the",
"Subject",
"should",
"be",
"copied",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/CopyAfter.php#L22-L27 |
neos/neos-ui | Classes/Domain/Model/Changes/CopyAfter.php | CopyAfter.apply | public function apply()
{
if ($this->canApply()) {
$nodeName = $this->generateUniqueNodeName($this->getSiblingNode()->getParent());
$node = $this->getSubject()->copyAfter($this->getSiblingNode(), $nodeName);
$this->finish($node);
}
} | php | public function apply()
{
if ($this->canApply()) {
$nodeName = $this->generateUniqueNodeName($this->getSiblingNode()->getParent());
$node = $this->getSubject()->copyAfter($this->getSiblingNode(), $nodeName);
$this->finish($node);
}
} | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"nodeName",
"=",
"$",
"this",
"->",
"generateUniqueNodeName",
"(",
"$",
"this",
"->",
"getSiblingNode",
"(",
")",
"->",
"getParent",
"(",
... | Applies this change
@return void | [
"Applies",
"this",
"change"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/CopyAfter.php#L39-L46 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.initializeController | public function initializeController(RequestInterface $request, ResponseInterface $response)
{
parent::initializeController($request, $response);
$this->feedbackCollection->setControllerContext($this->getControllerContext());
} | php | public function initializeController(RequestInterface $request, ResponseInterface $response)
{
parent::initializeController($request, $response);
$this->feedbackCollection->setControllerContext($this->getControllerContext());
} | [
"public",
"function",
"initializeController",
"(",
"RequestInterface",
"$",
"request",
",",
"ResponseInterface",
"$",
"response",
")",
"{",
"parent",
"::",
"initializeController",
"(",
"$",
"request",
",",
"$",
"response",
")",
";",
"$",
"this",
"->",
"feedbackC... | Set the controller context on the feedback collection after the controller
has been initialized
@param RequestInterface $request
@param ResponseInterface $response
@return void | [
"Set",
"the",
"controller",
"context",
"on",
"the",
"feedback",
"collection",
"after",
"the",
"controller",
"has",
"been",
"initialized"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L131-L135 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.updateWorkspaceInfo | protected function updateWorkspaceInfo(string $documentNodeContextPath)
{
$updateWorkspaceInfo = new UpdateWorkspaceInfo();
$documentNode = $this->nodeService->getNodeFromContextPath($documentNodeContextPath, null, null, true);
$updateWorkspaceInfo->setWorkspace(
$documentNode->g... | php | protected function updateWorkspaceInfo(string $documentNodeContextPath)
{
$updateWorkspaceInfo = new UpdateWorkspaceInfo();
$documentNode = $this->nodeService->getNodeFromContextPath($documentNodeContextPath, null, null, true);
$updateWorkspaceInfo->setWorkspace(
$documentNode->g... | [
"protected",
"function",
"updateWorkspaceInfo",
"(",
"string",
"$",
"documentNodeContextPath",
")",
"{",
"$",
"updateWorkspaceInfo",
"=",
"new",
"UpdateWorkspaceInfo",
"(",
")",
";",
"$",
"documentNode",
"=",
"$",
"this",
"->",
"nodeService",
"->",
"getNodeFromConte... | Helper method to inform the client, that new workspace information is available
@param string $documentNodeContextPath
@return void | [
"Helper",
"method",
"to",
"inform",
"the",
"client",
"that",
"new",
"workspace",
"information",
"is",
"available"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L143-L152 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.changeAction | public function changeAction(ChangeCollection $changes)
{
try {
$count = $changes->count();
$changes->apply();
$success = new Info();
$success->setMessage(sprintf('%d change(s) successfully applied.', $count));
$this->feedbackCollection->add($suc... | php | public function changeAction(ChangeCollection $changes)
{
try {
$count = $changes->count();
$changes->apply();
$success = new Info();
$success->setMessage(sprintf('%d change(s) successfully applied.', $count));
$this->feedbackCollection->add($suc... | [
"public",
"function",
"changeAction",
"(",
"ChangeCollection",
"$",
"changes",
")",
"{",
"try",
"{",
"$",
"count",
"=",
"$",
"changes",
"->",
"count",
"(",
")",
";",
"$",
"changes",
"->",
"apply",
"(",
")",
";",
"$",
"success",
"=",
"new",
"Info",
"(... | Apply a set of changes to the system
@param ChangeCollection $changes
@return void | [
"Apply",
"a",
"set",
"of",
"changes",
"to",
"the",
"system"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L160-L179 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.publishAction | public function publishAction(array $nodeContextPaths, string $targetWorkspaceName)
{
try {
$targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);
foreach ($nodeContextPaths as $contextPath) {
$node = $this->nodeService->getNodeFromContex... | php | public function publishAction(array $nodeContextPaths, string $targetWorkspaceName)
{
try {
$targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);
foreach ($nodeContextPaths as $contextPath) {
$node = $this->nodeService->getNodeFromContex... | [
"public",
"function",
"publishAction",
"(",
"array",
"$",
"nodeContextPaths",
",",
"string",
"$",
"targetWorkspaceName",
")",
"{",
"try",
"{",
"$",
"targetWorkspace",
"=",
"$",
"this",
"->",
"workspaceRepository",
"->",
"findOneByName",
"(",
"$",
"targetWorkspaceN... | Publish nodes
@param array $nodeContextPaths
@param string $targetWorkspaceName
@return void | [
"Publish",
"nodes"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L188-L213 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.discardAction | public function discardAction(array $nodeContextPaths)
{
try {
foreach ($nodeContextPaths as $contextPath) {
$node = $this->nodeService->getNodeFromContextPath($contextPath, null, null, true);
if ($node->isRemoved() === true) {
// When discardi... | php | public function discardAction(array $nodeContextPaths)
{
try {
foreach ($nodeContextPaths as $contextPath) {
$node = $this->nodeService->getNodeFromContextPath($contextPath, null, null, true);
if ($node->isRemoved() === true) {
// When discardi... | [
"public",
"function",
"discardAction",
"(",
"array",
"$",
"nodeContextPaths",
")",
"{",
"try",
"{",
"foreach",
"(",
"$",
"nodeContextPaths",
"as",
"$",
"contextPath",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"nodeService",
"->",
"getNodeFromContextPath",... | Discard nodes
@param array $nodeContextPaths
@return void | [
"Discard",
"nodes"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L221-L269 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.changeBaseWorkspaceAction | public function changeBaseWorkspaceAction(string $targetWorkspaceName, NodeInterface $documentNode)
{
try {
$targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);
$userWorkspace = $this->userService->getPersonalWorkspace();
if (count($this->w... | php | public function changeBaseWorkspaceAction(string $targetWorkspaceName, NodeInterface $documentNode)
{
try {
$targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);
$userWorkspace = $this->userService->getPersonalWorkspace();
if (count($this->w... | [
"public",
"function",
"changeBaseWorkspaceAction",
"(",
"string",
"$",
"targetWorkspaceName",
",",
"NodeInterface",
"$",
"documentNode",
")",
"{",
"try",
"{",
"$",
"targetWorkspace",
"=",
"$",
"this",
"->",
"workspaceRepository",
"->",
"findOneByName",
"(",
"$",
"... | Change base workspace of current user workspace
@param string $targetWorkspaceName ,
@param NodeInterface $documentNode
@return void
@throws \Exception | [
"Change",
"base",
"workspace",
"of",
"current",
"user",
"workspace"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L279-L341 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.loadTreeAction | public function loadTreeAction(NodeTreeBuilder $nodeTreeArguments, $includeRoot = false)
{
$nodeTreeArguments->setControllerContext($this->controllerContext);
$this->view->assign('value', $nodeTreeArguments->build($includeRoot));
} | php | public function loadTreeAction(NodeTreeBuilder $nodeTreeArguments, $includeRoot = false)
{
$nodeTreeArguments->setControllerContext($this->controllerContext);
$this->view->assign('value', $nodeTreeArguments->build($includeRoot));
} | [
"public",
"function",
"loadTreeAction",
"(",
"NodeTreeBuilder",
"$",
"nodeTreeArguments",
",",
"$",
"includeRoot",
"=",
"false",
")",
"{",
"$",
"nodeTreeArguments",
"->",
"setControllerContext",
"(",
"$",
"this",
"->",
"controllerContext",
")",
";",
"$",
"this",
... | Load the nodetree
@param NodeTreeBuilder $nodeTreeArguments
@param boolean $includeRoot
@return void | [
"Load",
"the",
"nodetree"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L394-L398 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.getAdditionalNodeMetadataAction | public function getAdditionalNodeMetadataAction(array $nodes)
{
$result = [];
/** @var NodeInterface $node */
foreach ($nodes as $node) {
$otherNodeVariants = array_values(array_filter(array_map(function ($node) {
return $this->getCurrentDimensionPresetIdentifiers... | php | public function getAdditionalNodeMetadataAction(array $nodes)
{
$result = [];
/** @var NodeInterface $node */
foreach ($nodes as $node) {
$otherNodeVariants = array_values(array_filter(array_map(function ($node) {
return $this->getCurrentDimensionPresetIdentifiers... | [
"public",
"function",
"getAdditionalNodeMetadataAction",
"(",
"array",
"$",
"nodes",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"/** @var NodeInterface $node */",
"foreach",
"(",
"$",
"nodes",
"as",
"$",
"node",
")",
"{",
"$",
"otherNodeVariants",
"=",
"arra... | Fetches all the node information that can be lazy-loaded
@param array<NodeInterface> $nodes | [
"Fetches",
"all",
"the",
"node",
"information",
"that",
"can",
"be",
"lazy",
"-",
"loaded"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L413-L429 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.getCurrentDimensionPresetIdentifiersForNode | protected function getCurrentDimensionPresetIdentifiersForNode($node)
{
$targetPresets = $this->contentDimensionsPresetSource->findPresetsByTargetValues($node->getDimensions());
$presetCombo = [];
foreach ($targetPresets as $dimensionName => $presetConfig) {
$fullPresetConfig = $... | php | protected function getCurrentDimensionPresetIdentifiersForNode($node)
{
$targetPresets = $this->contentDimensionsPresetSource->findPresetsByTargetValues($node->getDimensions());
$presetCombo = [];
foreach ($targetPresets as $dimensionName => $presetConfig) {
$fullPresetConfig = $... | [
"protected",
"function",
"getCurrentDimensionPresetIdentifiersForNode",
"(",
"$",
"node",
")",
"{",
"$",
"targetPresets",
"=",
"$",
"this",
"->",
"contentDimensionsPresetSource",
"->",
"findPresetsByTargetValues",
"(",
"$",
"node",
"->",
"getDimensions",
"(",
")",
")"... | Gets an array of current preset identifiers for each dimension of the give node
@param NodeInterface $node
@return array | [
"Gets",
"an",
"array",
"of",
"current",
"preset",
"identifiers",
"for",
"each",
"dimension",
"of",
"the",
"give",
"node"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L437-L446 |
neos/neos-ui | Classes/Controller/BackendServiceController.php | BackendServiceController.flowQueryAction | public function flowQueryAction(array $chain)
{
$createContext = array_shift($chain);
$finisher = array_pop($chain);
$flowQuery = new FlowQuery(array_map(
function ($envelope) {
return $this->nodeService->getNodeFromContextPath($envelope['$node']);
},... | php | public function flowQueryAction(array $chain)
{
$createContext = array_shift($chain);
$finisher = array_pop($chain);
$flowQuery = new FlowQuery(array_map(
function ($envelope) {
return $this->nodeService->getNodeFromContextPath($envelope['$node']);
},... | [
"public",
"function",
"flowQueryAction",
"(",
"array",
"$",
"chain",
")",
"{",
"$",
"createContext",
"=",
"array_shift",
"(",
"$",
"chain",
")",
";",
"$",
"finisher",
"=",
"array_pop",
"(",
"$",
"chain",
")",
";",
"$",
"flowQuery",
"=",
"new",
"FlowQuery... | Build and execute a flow query chain
@param array $chain
@return string | [
"Build",
"and",
"execute",
"a",
"flow",
"query",
"chain"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendServiceController.php#L454-L485 |
neos/neos-ui | Classes/Fusion/ArrayCollectionImplementation.php | ArrayCollectionImplementation.evaluate | public function evaluate()
{
$collection = $this->fusionValue('collection');
$output = [];
if ($collection === null) {
return [];
}
$this->numberOfRenderedNodes = 0;
$itemName = $this->getItemName();
$itemKey = $this->fusionValue('itemKey');
... | php | public function evaluate()
{
$collection = $this->fusionValue('collection');
$output = [];
if ($collection === null) {
return [];
}
$this->numberOfRenderedNodes = 0;
$itemName = $this->getItemName();
$itemKey = $this->fusionValue('itemKey');
... | [
"public",
"function",
"evaluate",
"(",
")",
"{",
"$",
"collection",
"=",
"$",
"this",
"->",
"fusionValue",
"(",
"'collection'",
")",
";",
"$",
"output",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"collection",
"===",
"null",
")",
"{",
"return",
"[",
"]",
... | Evaluate the collection nodes
@return string|array
@throws FusionException | [
"Evaluate",
"the",
"collection",
"nodes"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/ArrayCollectionImplementation.php#L28-L66 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractCreate.php | AbstractCreate.setNodeType | public function setNodeType($nodeType)
{
if (is_string($nodeType)) {
$nodeType = $this->nodeTypeManager->getNodeType($nodeType);
}
if (!$nodeType instanceof NodeType) {
throw new \InvalidArgumentException('nodeType needs to be of type string or NodeType', 1452100970)... | php | public function setNodeType($nodeType)
{
if (is_string($nodeType)) {
$nodeType = $this->nodeTypeManager->getNodeType($nodeType);
}
if (!$nodeType instanceof NodeType) {
throw new \InvalidArgumentException('nodeType needs to be of type string or NodeType', 1452100970)... | [
"public",
"function",
"setNodeType",
"(",
"$",
"nodeType",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"nodeType",
")",
")",
"{",
"$",
"nodeType",
"=",
"$",
"this",
"->",
"nodeTypeManager",
"->",
"getNodeType",
"(",
"$",
"nodeType",
")",
";",
"}",
"if"... | Set the node type
@param string $nodeType | [
"Set",
"the",
"node",
"type"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractCreate.php#L62-L73 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractCreate.php | AbstractCreate.createNode | protected function createNode(NodeInterface $parent)
{
$nodeType = $this->getNodeType();
$name = $this->getName() ?: $this->nodeService->generateUniqueNodeName($parent->getPath());
$node = $parent->createNode($name, $nodeType);
$this->applyNodeCreationHandlers($node);
$thi... | php | protected function createNode(NodeInterface $parent)
{
$nodeType = $this->getNodeType();
$name = $this->getName() ?: $this->nodeService->generateUniqueNodeName($parent->getPath());
$node = $parent->createNode($name, $nodeType);
$this->applyNodeCreationHandlers($node);
$thi... | [
"protected",
"function",
"createNode",
"(",
"NodeInterface",
"$",
"parent",
")",
"{",
"$",
"nodeType",
"=",
"$",
"this",
"->",
"getNodeType",
"(",
")",
";",
"$",
"name",
"=",
"$",
"this",
"->",
"getName",
"(",
")",
"?",
":",
"$",
"this",
"->",
"nodeS... | Creates a new node beneath $parent
@param NodeInterface $parent
@return NodeInterface | [
"Creates",
"a",
"new",
"node",
"beneath",
"$parent"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractCreate.php#L131-L145 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractCreate.php | AbstractCreate.applyNodeCreationHandlers | protected function applyNodeCreationHandlers(NodeInterface $node)
{
$data = $this->getData() ?: [];
$nodeType = $node->getNodeType();
if (isset($nodeType->getOptions()['nodeCreationHandlers'])) {
$nodeCreationHandlers = $nodeType->getOptions()['nodeCreationHandlers'];
... | php | protected function applyNodeCreationHandlers(NodeInterface $node)
{
$data = $this->getData() ?: [];
$nodeType = $node->getNodeType();
if (isset($nodeType->getOptions()['nodeCreationHandlers'])) {
$nodeCreationHandlers = $nodeType->getOptions()['nodeCreationHandlers'];
... | [
"protected",
"function",
"applyNodeCreationHandlers",
"(",
"NodeInterface",
"$",
"node",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"getData",
"(",
")",
"?",
":",
"[",
"]",
";",
"$",
"nodeType",
"=",
"$",
"node",
"->",
"getNodeType",
"(",
")",
";",... | Apply nodeCreationHandlers
@param NodeInterface $node
@throws InvalidNodeCreationHandlerException
@return void | [
"Apply",
"nodeCreationHandlers"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractCreate.php#L154-L172 |
neos/neos-ui | Migrations/Code/Version20190319094900.php | Version20190319094900.transformLegacyFormatting | protected function transformLegacyFormatting(array &$editorOptions)
{
if (isset($editorOptions['formatting']['u'])) {
$editorOptions['formatting']['underline'] = $editorOptions['formatting']['u'];
unset($editorOptions['formatting']['u']);
}
if (isset($editorOptions['... | php | protected function transformLegacyFormatting(array &$editorOptions)
{
if (isset($editorOptions['formatting']['u'])) {
$editorOptions['formatting']['underline'] = $editorOptions['formatting']['u'];
unset($editorOptions['formatting']['u']);
}
if (isset($editorOptions['... | [
"protected",
"function",
"transformLegacyFormatting",
"(",
"array",
"&",
"$",
"editorOptions",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"editorOptions",
"[",
"'formatting'",
"]",
"[",
"'u'",
"]",
")",
")",
"{",
"$",
"editorOptions",
"[",
"'formatting'",
"]",
... | Takes legacy aloha formatting and return editorOptions
@param array $editorOptions | [
"Takes",
"legacy",
"aloha",
"formatting",
"and",
"return",
"editorOptions"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Migrations/Code/Version20190319094900.php#L58-L69 |
neos/neos-ui | Classes/Domain/Service/UserLocaleService.php | UserLocaleService.switchToUILocale | public function switchToUILocale($reset = false)
{
if ($reset === true) {
// Reset the locale
$this->i18nService->getConfiguration()->setCurrentLocale($this->rememberedContentLocale);
} else {
$this->rememberedContentLocale = $this->i18nService->getConfiguration()... | php | public function switchToUILocale($reset = false)
{
if ($reset === true) {
// Reset the locale
$this->i18nService->getConfiguration()->setCurrentLocale($this->rememberedContentLocale);
} else {
$this->rememberedContentLocale = $this->i18nService->getConfiguration()... | [
"public",
"function",
"switchToUILocale",
"(",
"$",
"reset",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"reset",
"===",
"true",
")",
"{",
"// Reset the locale",
"$",
"this",
"->",
"i18nService",
"->",
"getConfiguration",
"(",
")",
"->",
"setCurrentLocale",
"(",... | For serialization, we need to respect the UI locale, rather than the content locale
@param boolean $reset Reset to remebered locale | [
"For",
"serialization",
"we",
"need",
"to",
"respect",
"the",
"UI",
"locale",
"rather",
"than",
"the",
"content",
"locale"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Service/UserLocaleService.php#L46-L58 |
neos/neos-ui | Classes/TypeConverter/ChangeCollectionConverter.php | ChangeCollectionConverter.convertFrom | public function convertFrom($source, $targetType, array $subProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if (!is_array($source)) {
return new Error(sprintf('Cannot convert %s to ChangeCollection.', gettype($source)));
}
$changeCollection = new ... | php | public function convertFrom($source, $targetType, array $subProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
if (!is_array($source)) {
return new Error(sprintf('Cannot convert %s to ChangeCollection.', gettype($source)));
}
$changeCollection = new ... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"subProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$... | Converts a accordingly formatted, associative array to a change collection
@param array $source
@param string $targetType not used
@param array $subProperties not used
@param \Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration not used
@return mixed An object or \Neos\Error\Messages\Error if the i... | [
"Converts",
"a",
"accordingly",
"formatted",
"associative",
"array",
"to",
"a",
"change",
"collection"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/TypeConverter/ChangeCollectionConverter.php#L101-L119 |
neos/neos-ui | Classes/TypeConverter/ChangeCollectionConverter.php | ChangeCollectionConverter.convertChangeData | protected function convertChangeData($changeData)
{
$type = $changeData['type'];
if (!isset($this->typeMap[$type])) {
return new Error(sprintf('Could not convert change type %s, it is unknown to the system', $type));
}
$changeClass = $this->typeMap[$type];
$chan... | php | protected function convertChangeData($changeData)
{
$type = $changeData['type'];
if (!isset($this->typeMap[$type])) {
return new Error(sprintf('Could not convert change type %s, it is unknown to the system', $type));
}
$changeClass = $this->typeMap[$type];
$chan... | [
"protected",
"function",
"convertChangeData",
"(",
"$",
"changeData",
")",
"{",
"$",
"type",
"=",
"$",
"changeData",
"[",
"'type'",
"]",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"typeMap",
"[",
"$",
"type",
"]",
")",
")",
"{",
"return",
... | Convert array to change interface
@param array $changeData
@return ChangeInterface | [
"Convert",
"array",
"to",
"change",
"interface"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/TypeConverter/ChangeCollectionConverter.php#L127-L180 |
neos/neos-ui | Classes/Domain/Service/NodePropertyConversionService.php | NodePropertyConversionService.convert | public function convert(NodeType $nodeType, $propertyName, $rawValue, Context $context)
{
$propertyType = $nodeType->getPropertyType($propertyName);
switch ($propertyType) {
case 'string':
return $rawValue;
case 'reference':
return $this->con... | php | public function convert(NodeType $nodeType, $propertyName, $rawValue, Context $context)
{
$propertyType = $nodeType->getPropertyType($propertyName);
switch ($propertyType) {
case 'string':
return $rawValue;
case 'reference':
return $this->con... | [
"public",
"function",
"convert",
"(",
"NodeType",
"$",
"nodeType",
",",
"$",
"propertyName",
",",
"$",
"rawValue",
",",
"Context",
"$",
"context",
")",
"{",
"$",
"propertyType",
"=",
"$",
"nodeType",
"->",
"getPropertyType",
"(",
"$",
"propertyName",
")",
... | Convert raw property values to the correct type according to a node type configuration
@param NodeType $nodeType
@param string $propertyName
@param string $rawValue
@param Context $context
@return mixed | [
"Convert",
"raw",
"property",
"values",
"to",
"the",
"correct",
"type",
"according",
"to",
"a",
"node",
"type",
"configuration"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Service/NodePropertyConversionService.php#L52-L101 |
neos/neos-ui | Classes/Domain/Service/NodePropertyConversionService.php | NodePropertyConversionService.convertReferences | protected function convertReferences($rawValue, Context $context)
{
$nodeIdentifiers = $rawValue;
$result = [];
if (is_array($nodeIdentifiers)) {
foreach ($nodeIdentifiers as $nodeIdentifier) {
$referencedNode = $context->getNodeByIdentifier($nodeIdentifier);
... | php | protected function convertReferences($rawValue, Context $context)
{
$nodeIdentifiers = $rawValue;
$result = [];
if (is_array($nodeIdentifiers)) {
foreach ($nodeIdentifiers as $nodeIdentifier) {
$referencedNode = $context->getNodeByIdentifier($nodeIdentifier);
... | [
"protected",
"function",
"convertReferences",
"(",
"$",
"rawValue",
",",
"Context",
"$",
"context",
")",
"{",
"$",
"nodeIdentifiers",
"=",
"$",
"rawValue",
";",
"$",
"result",
"=",
"[",
"]",
";",
"if",
"(",
"is_array",
"(",
"$",
"nodeIdentifiers",
")",
"... | Convert raw value to references
@param string $rawValue
@param Context $context
@return array<NodeInterface> | [
"Convert",
"raw",
"value",
"to",
"references"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Service/NodePropertyConversionService.php#L122-L137 |
neos/neos-ui | Classes/Domain/Service/NodePropertyConversionService.php | NodePropertyConversionService.convertDateTime | protected function convertDateTime($rawValue)
{
if ($rawValue !== '') {
$result = \DateTime::createFromFormat(\DateTime::W3C, $rawValue);
$result->setTimezone(new \DateTimeZone(date_default_timezone_get()));
return $result;
}
} | php | protected function convertDateTime($rawValue)
{
if ($rawValue !== '') {
$result = \DateTime::createFromFormat(\DateTime::W3C, $rawValue);
$result->setTimezone(new \DateTimeZone(date_default_timezone_get()));
return $result;
}
} | [
"protected",
"function",
"convertDateTime",
"(",
"$",
"rawValue",
")",
"{",
"if",
"(",
"$",
"rawValue",
"!==",
"''",
")",
"{",
"$",
"result",
"=",
"\\",
"DateTime",
"::",
"createFromFormat",
"(",
"\\",
"DateTime",
"::",
"W3C",
",",
"$",
"rawValue",
")",
... | Convert raw value to \DateTime
@param string $rawValue
@return \DateTime|null | [
"Convert",
"raw",
"value",
"to",
"\\",
"DateTime"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Service/NodePropertyConversionService.php#L145-L153 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/Redirect.php | Redirect.serializePayload | public function serializePayload(ControllerContext $controllerContext)
{
$node = $this->getNode();
$redirectUri = $this->linkingService->createNodeUri($controllerContext, $node, null, null, true, [], '', false, [], false);
return [
'redirectUri' => $redirectUri,
'red... | php | public function serializePayload(ControllerContext $controllerContext)
{
$node = $this->getNode();
$redirectUri = $this->linkingService->createNodeUri($controllerContext, $node, null, null, true, [], '', false, [], false);
return [
'redirectUri' => $redirectUri,
'red... | [
"public",
"function",
"serializePayload",
"(",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"getNode",
"(",
")",
";",
"$",
"redirectUri",
"=",
"$",
"this",
"->",
"linkingService",
"->",
"createNodeUri",
"(",
"... | Serialize the payload for this feedback
@param ControllerContext $controllerContext
@return array | [
"Serialize",
"the",
"payload",
"for",
"this",
"feedback"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/Redirect.php#L93-L102 |
neos/neos-ui | Classes/ContentRepository/Service/WorkspaceService.php | WorkspaceService.getPublishableNodeInfo | public function getPublishableNodeInfo(Workspace $workspace)
{
$publishableNodes = $this->publishingService->getUnpublishedNodes($workspace);
$publishableNodes = array_map(function ($node) {
if ($documentNode = $this->nodeService->getClosestDocument($node)) {
return [
... | php | public function getPublishableNodeInfo(Workspace $workspace)
{
$publishableNodes = $this->publishingService->getUnpublishedNodes($workspace);
$publishableNodes = array_map(function ($node) {
if ($documentNode = $this->nodeService->getClosestDocument($node)) {
return [
... | [
"public",
"function",
"getPublishableNodeInfo",
"(",
"Workspace",
"$",
"workspace",
")",
"{",
"$",
"publishableNodes",
"=",
"$",
"this",
"->",
"publishingService",
"->",
"getUnpublishedNodes",
"(",
"$",
"workspace",
")",
";",
"$",
"publishableNodes",
"=",
"array_m... | Get all publishable node context paths for a workspace
@param Workspace $workspace
@return array | [
"Get",
"all",
"publishable",
"node",
"context",
"paths",
"for",
"a",
"workspace"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/WorkspaceService.php#L62-L78 |
neos/neos-ui | Classes/ContentRepository/Service/WorkspaceService.php | WorkspaceService.getAllowedTargetWorkspaces | public function getAllowedTargetWorkspaces()
{
$user = $this->domainUserService->getCurrentUser();
$workspacesArray = [];
/** @var Workspace $workspace */
foreach ($this->workspaceRepository->findAll() as $workspace) {
// FIXME: This check should be implemented through a... | php | public function getAllowedTargetWorkspaces()
{
$user = $this->domainUserService->getCurrentUser();
$workspacesArray = [];
/** @var Workspace $workspace */
foreach ($this->workspaceRepository->findAll() as $workspace) {
// FIXME: This check should be implemented through a... | [
"public",
"function",
"getAllowedTargetWorkspaces",
"(",
")",
"{",
"$",
"user",
"=",
"$",
"this",
"->",
"domainUserService",
"->",
"getCurrentUser",
"(",
")",
";",
"$",
"workspacesArray",
"=",
"[",
"]",
";",
"/** @var Workspace $workspace */",
"foreach",
"(",
"$... | Get allowed target workspaces for current user
@return array | [
"Get",
"allowed",
"target",
"workspaces",
"for",
"current",
"user"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/WorkspaceService.php#L85-L117 |
neos/neos-ui | Classes/ContentRepository/Service/WorkspaceService.php | WorkspaceService.setBaseWorkspace | public function setBaseWorkspace(Workspace $workspace)
{
$userWorkspace = $this->userService->getPersonalWorkspace();
$userWorkspace->setBaseWorkspace($workspace);
} | php | public function setBaseWorkspace(Workspace $workspace)
{
$userWorkspace = $this->userService->getPersonalWorkspace();
$userWorkspace->setBaseWorkspace($workspace);
} | [
"public",
"function",
"setBaseWorkspace",
"(",
"Workspace",
"$",
"workspace",
")",
"{",
"$",
"userWorkspace",
"=",
"$",
"this",
"->",
"userService",
"->",
"getPersonalWorkspace",
"(",
")",
";",
"$",
"userWorkspace",
"->",
"setBaseWorkspace",
"(",
"$",
"workspace... | Sets base workspace of current user workspace
@param Workspace $workspace
@return void | [
"Sets",
"base",
"workspace",
"of",
"current",
"user",
"workspace"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/WorkspaceService.php#L125-L129 |
neos/neos-ui | Classes/Aspects/AugmentationAspect.php | AugmentationAspect.contentElementAugmentation | public function contentElementAugmentation(JoinPointInterface $joinPoint)
{
/** @var NodeInterface $node */
$node = $joinPoint->getMethodArgument('node');
if (
!$this->session->isStarted()
|| $this->session->getData('__neosLegacyUiEnabled__')
|| $node->ge... | php | public function contentElementAugmentation(JoinPointInterface $joinPoint)
{
/** @var NodeInterface $node */
$node = $joinPoint->getMethodArgument('node');
if (
!$this->session->isStarted()
|| $this->session->getData('__neosLegacyUiEnabled__')
|| $node->ge... | [
"public",
"function",
"contentElementAugmentation",
"(",
"JoinPointInterface",
"$",
"joinPoint",
")",
"{",
"/** @var NodeInterface $node */",
"$",
"node",
"=",
"$",
"joinPoint",
"->",
"getMethodArgument",
"(",
"'node'",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",... | Hooks into standard content element wrapping to render those attributes needed for the package to identify
nodes and Fusion paths
@Flow\Around("method(Neos\Neos\Service\ContentElementWrappingService->wrapContentObject())")
@param JoinPointInterface $joinPoint the join point
@return mixed | [
"Hooks",
"into",
"standard",
"content",
"element",
"wrapping",
"to",
"render",
"those",
"attributes",
"needed",
"for",
"the",
"package",
"to",
"identify",
"nodes",
"and",
"Fusion",
"paths"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Aspects/AugmentationAspect.php#L130-L168 |
neos/neos-ui | Classes/Aspects/AugmentationAspect.php | AugmentationAspect.editableElementAugmentation | public function editableElementAugmentation(JoinPointInterface $joinPoint)
{
if (!$this->session->isStarted() || $this->session->getData('__neosLegacyUiEnabled__')) {
return $joinPoint->getAdviceChain()->proceed($joinPoint);
}
$property = $joinPoint->getMethodArgument('property'... | php | public function editableElementAugmentation(JoinPointInterface $joinPoint)
{
if (!$this->session->isStarted() || $this->session->getData('__neosLegacyUiEnabled__')) {
return $joinPoint->getAdviceChain()->proceed($joinPoint);
}
$property = $joinPoint->getMethodArgument('property'... | [
"public",
"function",
"editableElementAugmentation",
"(",
"JoinPointInterface",
"$",
"joinPoint",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"session",
"->",
"isStarted",
"(",
")",
"||",
"$",
"this",
"->",
"session",
"->",
"getData",
"(",
"'__neosLegacyUiEna... | Hooks into the editable viewhelper to render those attributes needed for the package's inline editing
@Flow\Around("method(Neos\Neos\Service\ContentElementEditableService->wrapContentProperty())")
@param JoinPointInterface $joinPoint the join point
@return mixed | [
"Hooks",
"into",
"the",
"editable",
"viewhelper",
"to",
"render",
"those",
"attributes",
"needed",
"for",
"the",
"package",
"s",
"inline",
"editing"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Aspects/AugmentationAspect.php#L177-L201 |
neos/neos-ui | Classes/Aspects/AugmentationAspect.php | AugmentationAspect.appendNonRenderedContentNodeMetadata | protected function appendNonRenderedContentNodeMetadata(NodeInterface $documentNode)
{
if ($documentNode->getContext()->getWorkspace()->isPublicWorkspace()) {
return;
}
foreach ($documentNode->getChildNodes($this->buildFilterForNonRenderedContent()) as $node) {
if (i... | php | protected function appendNonRenderedContentNodeMetadata(NodeInterface $documentNode)
{
if ($documentNode->getContext()->getWorkspace()->isPublicWorkspace()) {
return;
}
foreach ($documentNode->getChildNodes($this->buildFilterForNonRenderedContent()) as $node) {
if (i... | [
"protected",
"function",
"appendNonRenderedContentNodeMetadata",
"(",
"NodeInterface",
"$",
"documentNode",
")",
"{",
"if",
"(",
"$",
"documentNode",
"->",
"getContext",
"(",
")",
"->",
"getWorkspace",
"(",
")",
"->",
"isPublicWorkspace",
"(",
")",
")",
"{",
"re... | Concatenate strings containing `<script>` tags for all child nodes not rendered
within the current document node. This way we can show e.g. content collections
within the structure tree which are not actually rendered.
@param NodeInterface $documentNode
@return void | [
"Concatenate",
"strings",
"containing",
"<script",
">",
"tags",
"for",
"all",
"child",
"nodes",
"not",
"rendered",
"within",
"the",
"current",
"document",
"node",
".",
"This",
"way",
"we",
"can",
"show",
"e",
".",
"g",
".",
"content",
"collections",
"within"... | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Aspects/AugmentationAspect.php#L224-L240 |
neos/neos-ui | Classes/Fusion/AppendAllToCollectionImplementation.php | AppendAllToCollectionImplementation.evaluate | public function evaluate()
{
$items = parent::evaluate();
$collection = $this->fusionValue('appendTo');
return array_merge($collection, $items);
} | php | public function evaluate()
{
$items = parent::evaluate();
$collection = $this->fusionValue('appendTo');
return array_merge($collection, $items);
} | [
"public",
"function",
"evaluate",
"(",
")",
"{",
"$",
"items",
"=",
"parent",
"::",
"evaluate",
"(",
")",
";",
"$",
"collection",
"=",
"$",
"this",
"->",
"fusionValue",
"(",
"'appendTo'",
")",
";",
"return",
"array_merge",
"(",
"$",
"collection",
",",
... | Evaluate the collection nodes
@return string
@throws FusionException | [
"Evaluate",
"the",
"collection",
"nodes"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/AppendAllToCollectionImplementation.php#L32-L38 |
neos/neos-ui | Classes/Fusion/Helper/ModulesHelper.php | ModulesHelper.isEnabled | public function isEnabled($modulePath)
{
$modulePathSegments = explode('/', $modulePath);
$moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));
if (isset($moduleConfiguration['enabled']) && $moduleConfiguration['enabled'] !== true) {
... | php | public function isEnabled($modulePath)
{
$modulePathSegments = explode('/', $modulePath);
$moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));
if (isset($moduleConfiguration['enabled']) && $moduleConfiguration['enabled'] !== true) {
... | [
"public",
"function",
"isEnabled",
"(",
"$",
"modulePath",
")",
"{",
"$",
"modulePathSegments",
"=",
"explode",
"(",
"'/'",
",",
"$",
"modulePath",
")",
";",
"$",
"moduleConfiguration",
"=",
"Arrays",
"::",
"getValueByPath",
"(",
"$",
"this",
"->",
"modules"... | Checks whether a module is enabled
@param string $modulePath
@return boolean | [
"Checks",
"whether",
"a",
"module",
"is",
"enabled"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/Helper/ModulesHelper.php#L41-L57 |
neos/neos-ui | Classes/Fusion/Helper/ModulesHelper.php | ModulesHelper.isAllowed | public function isAllowed($modulePath)
{
$modulePathSegments = explode('/', $modulePath);
$moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));
if (!$this->privilegeManager->isGranted(ModulePrivilege::class, new ModulePrivilegeSubject($... | php | public function isAllowed($modulePath)
{
$modulePathSegments = explode('/', $modulePath);
$moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));
if (!$this->privilegeManager->isGranted(ModulePrivilege::class, new ModulePrivilegeSubject($... | [
"public",
"function",
"isAllowed",
"(",
"$",
"modulePath",
")",
"{",
"$",
"modulePathSegments",
"=",
"explode",
"(",
"'/'",
",",
"$",
"modulePath",
")",
";",
"$",
"moduleConfiguration",
"=",
"Arrays",
"::",
"getValueByPath",
"(",
"$",
"this",
"->",
"modules"... | Checks whether the current user has access to a module
@param string $modulePath
@return boolean | [
"Checks",
"whether",
"the",
"current",
"user",
"has",
"access",
"to",
"a",
"module"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/Helper/ModulesHelper.php#L65-L80 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php | ReloadContentOutOfBand.isSimilarTo | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof ReloadContentOutOfBand) {
return false;
}
return (
$this->getNode()->getContextPath() === $feedback->getNode()->getContextPath() &&
$this->getNodeDomAddress() == $feedbac... | php | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof ReloadContentOutOfBand) {
return false;
}
return (
$this->getNode()->getContextPath() === $feedback->getNode()->getContextPath() &&
$this->getNodeDomAddress() == $feedbac... | [
"public",
"function",
"isSimilarTo",
"(",
"FeedbackInterface",
"$",
"feedback",
")",
"{",
"if",
"(",
"!",
"$",
"feedback",
"instanceof",
"ReloadContentOutOfBand",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"$",
"this",
"->",
"getNode",
"(",
")",
... | Checks whether this feedback is similar to another
@param FeedbackInterface $feedback
@return boolean | [
"Checks",
"whether",
"this",
"feedback",
"is",
"similar",
"to",
"another"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php#L119-L129 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php | ReloadContentOutOfBand.serializePayload | public function serializePayload(ControllerContext $controllerContext)
{
return [
'contextPath' => $this->getNode()->getContextPath(),
'nodeDomAddress' => $this->getNodeDomAddress(),
'renderedContent' => $this->renderContent($controllerContext)
];
} | php | public function serializePayload(ControllerContext $controllerContext)
{
return [
'contextPath' => $this->getNode()->getContextPath(),
'nodeDomAddress' => $this->getNodeDomAddress(),
'renderedContent' => $this->renderContent($controllerContext)
];
} | [
"public",
"function",
"serializePayload",
"(",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"return",
"[",
"'contextPath'",
"=>",
"$",
"this",
"->",
"getNode",
"(",
")",
"->",
"getContextPath",
"(",
")",
",",
"'nodeDomAddress'",
"=>",
"$",
"this",
... | Serialize the payload for this feedback
@return mixed | [
"Serialize",
"the",
"payload",
"for",
"this",
"feedback"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php#L136-L143 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php | ReloadContentOutOfBand.renderContent | protected function renderContent(ControllerContext $controllerContext)
{
$cacheTags = $this->cachingHelper->nodeTag($this->getNode());
foreach ($cacheTags as $tag) {
$this->contentCache->flushByTag($tag);
}
$nodeDomAddress = $this->getNodeDomAddress();
$fusionVi... | php | protected function renderContent(ControllerContext $controllerContext)
{
$cacheTags = $this->cachingHelper->nodeTag($this->getNode());
foreach ($cacheTags as $tag) {
$this->contentCache->flushByTag($tag);
}
$nodeDomAddress = $this->getNodeDomAddress();
$fusionVi... | [
"protected",
"function",
"renderContent",
"(",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"$",
"cacheTags",
"=",
"$",
"this",
"->",
"cachingHelper",
"->",
"nodeTag",
"(",
"$",
"this",
"->",
"getNode",
"(",
")",
")",
";",
"foreach",
"(",
"$",
... | Render the node
@param ControllerContext $controllerContext
@return string | [
"Render",
"the",
"node"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php#L151-L167 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/RemoveNode.php | RemoveNode.isSimilarTo | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof RemoveNode) {
return false;
}
return $this->getNode()->getContextPath() === $feedback->getNode()->getContextPath();
} | php | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof RemoveNode) {
return false;
}
return $this->getNode()->getContextPath() === $feedback->getNode()->getContextPath();
} | [
"public",
"function",
"isSimilarTo",
"(",
"FeedbackInterface",
"$",
"feedback",
")",
"{",
"if",
"(",
"!",
"$",
"feedback",
"instanceof",
"RemoveNode",
")",
"{",
"return",
"false",
";",
"}",
"return",
"$",
"this",
"->",
"getNode",
"(",
")",
"->",
"getContex... | Checks whether this feedback is similar to another
@param FeedbackInterface $feedback
@return boolean | [
"Checks",
"whether",
"this",
"feedback",
"is",
"similar",
"to",
"another"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/RemoveNode.php#L73-L80 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/RemoveNode.php | RemoveNode.serializePayload | public function serializePayload(ControllerContext $controllerContext)
{
return [
'contextPath' => $this->getNode()->getContextPath(),
'parentContextPath' => $this->getNode()->getParent()->getContextPath()
];
} | php | public function serializePayload(ControllerContext $controllerContext)
{
return [
'contextPath' => $this->getNode()->getContextPath(),
'parentContextPath' => $this->getNode()->getParent()->getContextPath()
];
} | [
"public",
"function",
"serializePayload",
"(",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"return",
"[",
"'contextPath'",
"=>",
"$",
"this",
"->",
"getNode",
"(",
")",
"->",
"getContextPath",
"(",
")",
",",
"'parentContextPath'",
"=>",
"$",
"this",... | Serialize the payload for this feedback
@param ControllerContext $controllerContext
@return mixed | [
"Serialize",
"the",
"payload",
"for",
"this",
"feedback"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/RemoveNode.php#L88-L94 |
neos/neos-ui | Classes/FlowQueryOperations/SearchOperation.php | SearchOperation.evaluate | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$term = isset($arguments[0]) ? $arguments[0] : null;
$filterNodeTypeName = isset($arguments[1]) ? $arguments[1] : null;
$nodeTypes = strlen($filterNodeTypeName) > 0 ? [$filterNodeTypeName] : array_keys($this->nodeTypeManager... | php | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$term = isset($arguments[0]) ? $arguments[0] : null;
$filterNodeTypeName = isset($arguments[1]) ? $arguments[1] : null;
$nodeTypes = strlen($filterNodeTypeName) > 0 ? [$filterNodeTypeName] : array_keys($this->nodeTypeManager... | [
"public",
"function",
"evaluate",
"(",
"FlowQuery",
"$",
"flowQuery",
",",
"array",
"$",
"arguments",
")",
"{",
"$",
"term",
"=",
"isset",
"(",
"$",
"arguments",
"[",
"0",
"]",
")",
"?",
"$",
"arguments",
"[",
"0",
"]",
":",
"null",
";",
"$",
"filt... | {@inheritdoc}
@param FlowQuery $flowQuery the FlowQuery object
@param array $arguments the arguments for this operation
@return void | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/FlowQueryOperations/SearchOperation.php#L83-L110 |
neos/neos-ui | Classes/Domain/Model/Changes/CreateAfter.php | CreateAfter.canApply | public function canApply()
{
$parent = $this->getSubject()->getParent();
$nodeType = $this->getNodeType();
return $parent->isNodeTypeAllowedAsChildNode($nodeType);
} | php | public function canApply()
{
$parent = $this->getSubject()->getParent();
$nodeType = $this->getNodeType();
return $parent->isNodeTypeAllowedAsChildNode($nodeType);
} | [
"public",
"function",
"canApply",
"(",
")",
"{",
"$",
"parent",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
"->",
"getParent",
"(",
")",
";",
"$",
"nodeType",
"=",
"$",
"this",
"->",
"getNodeType",
"(",
")",
";",
"return",
"$",
"parent",
"->",
... | Check if the new node's node type is allowed in the requested position
@return boolean | [
"Check",
"if",
"the",
"new",
"node",
"s",
"node",
"type",
"is",
"allowed",
"in",
"the",
"requested",
"position"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/CreateAfter.php#L31-L37 |
neos/neos-ui | Classes/Domain/Model/Changes/CreateAfter.php | CreateAfter.apply | public function apply()
{
if ($this->canApply()) {
$subject = $this->getSubject();
$parent = $subject->getParent();
$node = $this->createNode($parent);
$node->moveAfter($subject);
$this->updateWorkspaceInfo();
}
} | php | public function apply()
{
if ($this->canApply()) {
$subject = $this->getSubject();
$parent = $subject->getParent();
$node = $this->createNode($parent);
$node->moveAfter($subject);
$this->updateWorkspaceInfo();
}
} | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"subject",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
";",
"$",
"parent",
"=",
"$",
"subject",
"->",
"getParent",
"(",
")",
";",... | Create a new node after the subject
@return void | [
"Create",
"a",
"new",
"node",
"after",
"the",
"subject"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/CreateAfter.php#L44-L54 |
neos/neos-ui | Classes/Service/NodeClipboard.php | NodeClipboard.copyNode | public function copyNode(NodeInterface $node)
{
$this->nodeContextPath = $node->getContextPath();
$this->mode = self::MODE_COPY;
} | php | public function copyNode(NodeInterface $node)
{
$this->nodeContextPath = $node->getContextPath();
$this->mode = self::MODE_COPY;
} | [
"public",
"function",
"copyNode",
"(",
"NodeInterface",
"$",
"node",
")",
"{",
"$",
"this",
"->",
"nodeContextPath",
"=",
"$",
"node",
"->",
"getContextPath",
"(",
")",
";",
"$",
"this",
"->",
"mode",
"=",
"self",
"::",
"MODE_COPY",
";",
"}"
] | Save copied node to clipboard.
@param NodeInterface $node
@return void
@Flow\Session(autoStart=true) | [
"Save",
"copied",
"node",
"to",
"clipboard",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Service/NodeClipboard.php#L44-L48 |
neos/neos-ui | Classes/Service/NodeClipboard.php | NodeClipboard.cutNode | public function cutNode(NodeInterface $node)
{
$this->nodeContextPath = $node->getContextPath();
$this->mode = self::MODE_MOVE;
} | php | public function cutNode(NodeInterface $node)
{
$this->nodeContextPath = $node->getContextPath();
$this->mode = self::MODE_MOVE;
} | [
"public",
"function",
"cutNode",
"(",
"NodeInterface",
"$",
"node",
")",
"{",
"$",
"this",
"->",
"nodeContextPath",
"=",
"$",
"node",
"->",
"getContextPath",
"(",
")",
";",
"$",
"this",
"->",
"mode",
"=",
"self",
"::",
"MODE_MOVE",
";",
"}"
] | Save cut node to clipboard.
@param NodeInterface $node
@return void
@Flow\Session(autoStart=true) | [
"Save",
"cut",
"node",
"to",
"clipboard",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Service/NodeClipboard.php#L57-L61 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractStructuralChange.php | AbstractStructuralChange.getSiblingNode | public function getSiblingNode()
{
if ($this->siblingDomAddress === null) {
return null;
}
if ($this->cachedSiblingNode === null) {
$this->cachedSiblingNode = $this->nodeService->getNodeFromContextPath(
$this->siblingDomAddress->getContextPath()
... | php | public function getSiblingNode()
{
if ($this->siblingDomAddress === null) {
return null;
}
if ($this->cachedSiblingNode === null) {
$this->cachedSiblingNode = $this->nodeService->getNodeFromContextPath(
$this->siblingDomAddress->getContextPath()
... | [
"public",
"function",
"getSiblingNode",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"siblingDomAddress",
"===",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"cachedSiblingNode",
"===",
"null",
")",
"{",
"$",
"this",
"->"... | Get the sibling node
@return NodeInterface | [
"Get",
"the",
"sibling",
"node"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractStructuralChange.php#L109-L122 |
neos/neos-ui | Classes/Domain/Model/Changes/AbstractStructuralChange.php | AbstractStructuralChange.finish | protected function finish(NodeInterface $node)
{
$this->persistenceManager->persistAll();
$updateNodeInfo = new UpdateNodeInfo();
$updateNodeInfo->setNode($node);
$updateNodeInfo->recursive();
$updateParentNodeInfo = new UpdateNodeInfo();
$updateParentNodeInfo->setN... | php | protected function finish(NodeInterface $node)
{
$this->persistenceManager->persistAll();
$updateNodeInfo = new UpdateNodeInfo();
$updateNodeInfo->setNode($node);
$updateNodeInfo->recursive();
$updateParentNodeInfo = new UpdateNodeInfo();
$updateParentNodeInfo->setN... | [
"protected",
"function",
"finish",
"(",
"NodeInterface",
"$",
"node",
")",
"{",
"$",
"this",
"->",
"persistenceManager",
"->",
"persistAll",
"(",
")",
";",
"$",
"updateNodeInfo",
"=",
"new",
"UpdateNodeInfo",
"(",
")",
";",
"$",
"updateNodeInfo",
"->",
"setN... | Perform finish tasks - needs to be called from inheriting class on `apply`
@param NodeInterface $node
@return void | [
"Perform",
"finish",
"tasks",
"-",
"needs",
"to",
"be",
"called",
"from",
"inheriting",
"class",
"on",
"apply"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/AbstractStructuralChange.php#L130-L172 |
neos/neos-ui | Classes/Domain/Model/AbstractChange.php | AbstractChange.updateWorkspaceInfo | protected function updateWorkspaceInfo()
{
$nodeService = new NodeService();
$updateWorkspaceInfo = new UpdateWorkspaceInfo();
$documentNode = $nodeService->getClosestDocument($this->getSubject());
$updateWorkspaceInfo->setWorkspace(
$documentNode->getContext()->getWorksp... | php | protected function updateWorkspaceInfo()
{
$nodeService = new NodeService();
$updateWorkspaceInfo = new UpdateWorkspaceInfo();
$documentNode = $nodeService->getClosestDocument($this->getSubject());
$updateWorkspaceInfo->setWorkspace(
$documentNode->getContext()->getWorksp... | [
"protected",
"function",
"updateWorkspaceInfo",
"(",
")",
"{",
"$",
"nodeService",
"=",
"new",
"NodeService",
"(",
")",
";",
"$",
"updateWorkspaceInfo",
"=",
"new",
"UpdateWorkspaceInfo",
"(",
")",
";",
"$",
"documentNode",
"=",
"$",
"nodeService",
"->",
"getC... | Helper method to inform the client, that new workspace information is available
@return void | [
"Helper",
"method",
"to",
"inform",
"the",
"client",
"that",
"new",
"workspace",
"information",
"is",
"available"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/AbstractChange.php#L77-L87 |
neos/neos-ui | Classes/Domain/Model/AbstractChange.php | AbstractChange.reloadDocument | protected function reloadDocument($node = null)
{
$reloadDocument = new ReloadDocument();
if ($node) {
$reloadDocument->setNode($node);
}
$this->feedbackCollection->add($reloadDocument);
} | php | protected function reloadDocument($node = null)
{
$reloadDocument = new ReloadDocument();
if ($node) {
$reloadDocument->setNode($node);
}
$this->feedbackCollection->add($reloadDocument);
} | [
"protected",
"function",
"reloadDocument",
"(",
"$",
"node",
"=",
"null",
")",
"{",
"$",
"reloadDocument",
"=",
"new",
"ReloadDocument",
"(",
")",
";",
"if",
"(",
"$",
"node",
")",
"{",
"$",
"reloadDocument",
"->",
"setNode",
"(",
"$",
"node",
")",
";"... | Inform the client to reload the currently-displayed document, because the rendering has changed.
This method will be triggered if [nodeType].properties.[propertyName].ui.reloadIfChanged is TRUE.
@param NodeInterface $node
@return void | [
"Inform",
"the",
"client",
"to",
"reload",
"the",
"currently",
"-",
"displayed",
"document",
"because",
"the",
"rendering",
"has",
"changed",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/AbstractChange.php#L97-L105 |
neos/neos-ui | Classes/Domain/Model/AbstractChange.php | AbstractChange.addNodeCreatedFeedback | protected function addNodeCreatedFeedback($subject = null)
{
$node = $subject ?: $this->getSubject();
$nodeCreated = new NodeCreated();
$nodeCreated->setNode($node);
$this->feedbackCollection->add($nodeCreated);
} | php | protected function addNodeCreatedFeedback($subject = null)
{
$node = $subject ?: $this->getSubject();
$nodeCreated = new NodeCreated();
$nodeCreated->setNode($node);
$this->feedbackCollection->add($nodeCreated);
} | [
"protected",
"function",
"addNodeCreatedFeedback",
"(",
"$",
"subject",
"=",
"null",
")",
"{",
"$",
"node",
"=",
"$",
"subject",
"?",
":",
"$",
"this",
"->",
"getSubject",
"(",
")",
";",
"$",
"nodeCreated",
"=",
"new",
"NodeCreated",
"(",
")",
";",
"$"... | Inform the client that a node has been created, the client decides if and which tree should react to this change.
@param NodeInterface $subject
@return void | [
"Inform",
"the",
"client",
"that",
"a",
"node",
"has",
"been",
"created",
"the",
"client",
"decides",
"if",
"and",
"which",
"tree",
"should",
"react",
"to",
"this",
"change",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/AbstractChange.php#L113-L119 |
neos/neos-ui | Classes/Fusion/Helper/NodeInfoHelper.php | NodeInfoHelper.getUriInformation | protected function getUriInformation(NodeInterface $node, ControllerContext $controllerContext): array
{
$nodeInfo = [];
if (!$node->getNodeType()->isOfType($this->documentNodeTypeRole)) {
return $nodeInfo;
}
try {
$nodeInfo['uri'] = $this->createRedirectToNo... | php | protected function getUriInformation(NodeInterface $node, ControllerContext $controllerContext): array
{
$nodeInfo = [];
if (!$node->getNodeType()->isOfType($this->documentNodeTypeRole)) {
return $nodeInfo;
}
try {
$nodeInfo['uri'] = $this->createRedirectToNo... | [
"protected",
"function",
"getUriInformation",
"(",
"NodeInterface",
"$",
"node",
",",
"ControllerContext",
"$",
"controllerContext",
")",
":",
"array",
"{",
"$",
"nodeInfo",
"=",
"[",
"]",
";",
"if",
"(",
"!",
"$",
"node",
"->",
"getNodeType",
"(",
")",
"-... | Get the "uri" and "previewUri" for the given node
@param NodeInterface $node
@param ControllerContext $controllerContext
@return array | [
"Get",
"the",
"uri",
"and",
"previewUri",
"for",
"the",
"given",
"node"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/Helper/NodeInfoHelper.php#L181-L196 |
neos/neos-ui | Classes/Fusion/Helper/NodeInfoHelper.php | NodeInfoHelper.getBasicNodeInformation | protected function getBasicNodeInformation(NodeInterface $node): array
{
return [
'contextPath' => $node->getContextPath(),
'name' => $node->getName(),
'identifier' => $node->getIdentifier(),
'nodeType' => $node->getNodeType()->getName(),
'label' =... | php | protected function getBasicNodeInformation(NodeInterface $node): array
{
return [
'contextPath' => $node->getContextPath(),
'name' => $node->getName(),
'identifier' => $node->getIdentifier(),
'nodeType' => $node->getNodeType()->getName(),
'label' =... | [
"protected",
"function",
"getBasicNodeInformation",
"(",
"NodeInterface",
"$",
"node",
")",
":",
"array",
"{",
"return",
"[",
"'contextPath'",
"=>",
"$",
"node",
"->",
"getContextPath",
"(",
")",
",",
"'name'",
"=>",
"$",
"node",
"->",
"getName",
"(",
")",
... | Get the basic information about a node.
@param NodeInterface $node
@return array | [
"Get",
"the",
"basic",
"information",
"about",
"a",
"node",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/Helper/NodeInfoHelper.php#L204-L217 |
neos/neos-ui | Classes/Fusion/Helper/NodeInfoHelper.php | NodeInfoHelper.renderChildrenInformation | protected function renderChildrenInformation(NodeInterface $node, string $nodeTypeFilterString): array
{
$documentChildNodes = $node->getChildNodes($nodeTypeFilterString);
// child nodes for content tree, must not include those nodes filtered out by `baseNodeType`
$contentChildNodes = $node-... | php | protected function renderChildrenInformation(NodeInterface $node, string $nodeTypeFilterString): array
{
$documentChildNodes = $node->getChildNodes($nodeTypeFilterString);
// child nodes for content tree, must not include those nodes filtered out by `baseNodeType`
$contentChildNodes = $node-... | [
"protected",
"function",
"renderChildrenInformation",
"(",
"NodeInterface",
"$",
"node",
",",
"string",
"$",
"nodeTypeFilterString",
")",
":",
"array",
"{",
"$",
"documentChildNodes",
"=",
"$",
"node",
"->",
"getChildNodes",
"(",
"$",
"nodeTypeFilterString",
")",
... | Get information for all children of the given parent node.
@param NodeInterface $node
@param string $nodeTypeFilterString
@return array | [
"Get",
"information",
"for",
"all",
"children",
"of",
"the",
"given",
"parent",
"node",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/Helper/NodeInfoHelper.php#L226-L241 |
neos/neos-ui | Classes/Controller/BackendController.php | BackendController.indexAction | public function indexAction(NodeInterface $node = null)
{
$this->session->start();
$this->session->putData('__neosLegacyUiEnabled__', false);
$user = $this->userService->getBackendUser();
if ($user === null) {
$this->redirectToUri($this->uriBuilder->uriFor('index', [], '... | php | public function indexAction(NodeInterface $node = null)
{
$this->session->start();
$this->session->putData('__neosLegacyUiEnabled__', false);
$user = $this->userService->getBackendUser();
if ($user === null) {
$this->redirectToUri($this->uriBuilder->uriFor('index', [], '... | [
"public",
"function",
"indexAction",
"(",
"NodeInterface",
"$",
"node",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"session",
"->",
"start",
"(",
")",
";",
"$",
"this",
"->",
"session",
"->",
"putData",
"(",
"'__neosLegacyUiEnabled__'",
",",
"false",
")",
... | Displays the backend interface
@Flow\IgnoreValidation("$node")
@param NodeInterface $node The node that will be displayed on the first tab
@return void | [
"Displays",
"the",
"backend",
"interface"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendController.php#L123-L150 |
neos/neos-ui | Classes/Controller/BackendController.php | BackendController.deactivateAction | public function deactivateAction(NodeInterface $node = null)
{
if ($node === null) {
$node = $this->findNodeToEdit();
}
$this->session->start();
$this->session->putData('__neosLegacyUiEnabled__', true);
$this->redirect('show', 'Frontend\Node', 'Neos.Neos', ['nod... | php | public function deactivateAction(NodeInterface $node = null)
{
if ($node === null) {
$node = $this->findNodeToEdit();
}
$this->session->start();
$this->session->putData('__neosLegacyUiEnabled__', true);
$this->redirect('show', 'Frontend\Node', 'Neos.Neos', ['nod... | [
"public",
"function",
"deactivateAction",
"(",
"NodeInterface",
"$",
"node",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"node",
"===",
"null",
")",
"{",
"$",
"node",
"=",
"$",
"this",
"->",
"findNodeToEdit",
"(",
")",
";",
"}",
"$",
"this",
"->",
"sessio... | Deactivates the new UI and redirects back to the old one
@param NodeInterface|null $node
@return void | [
"Deactivates",
"the",
"new",
"UI",
"and",
"redirects",
"back",
"to",
"the",
"old",
"one"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendController.php#L158-L168 |
neos/neos-ui | Classes/Controller/BackendController.php | BackendController.createContext | protected function createContext($workspaceName)
{
$contextProperties = [
'workspaceName' => $workspaceName,
'invisibleContentShown' => true,
'inaccessibleContentShown' => true
];
$currentDomain = $this->domainRepository->findOneByActiveRequest();
... | php | protected function createContext($workspaceName)
{
$contextProperties = [
'workspaceName' => $workspaceName,
'invisibleContentShown' => true,
'inaccessibleContentShown' => true
];
$currentDomain = $this->domainRepository->findOneByActiveRequest();
... | [
"protected",
"function",
"createContext",
"(",
"$",
"workspaceName",
")",
"{",
"$",
"contextProperties",
"=",
"[",
"'workspaceName'",
"=>",
"$",
"workspaceName",
",",
"'invisibleContentShown'",
"=>",
"true",
",",
"'inaccessibleContentShown'",
"=>",
"true",
"]",
";",... | Create a ContentContext to be used for the backend redirects.
@param string $workspaceName
@return ContentContext | [
"Create",
"a",
"ContentContext",
"to",
"be",
"used",
"for",
"the",
"backend",
"redirects",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Controller/BackendController.php#L220-L238 |
neos/neos-ui | Classes/Domain/Model/Feedback/AbstractMessageFeedback.php | AbstractMessageFeedback.isSimilarTo | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof AbstractMessageFeedback) {
return false;
}
return (
$this->getSeverity() === $feedback->getSeverity() &&
$this->getMessage() === $feedback->getMessage()
);
} | php | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof AbstractMessageFeedback) {
return false;
}
return (
$this->getSeverity() === $feedback->getSeverity() &&
$this->getMessage() === $feedback->getMessage()
);
} | [
"public",
"function",
"isSimilarTo",
"(",
"FeedbackInterface",
"$",
"feedback",
")",
"{",
"if",
"(",
"!",
"$",
"feedback",
"instanceof",
"AbstractMessageFeedback",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"$",
"this",
"->",
"getSeverity",
"(",
"... | Checks whether this feedback is similar to another
@param FeedbackInterface $feedback
@return boolean | [
"Checks",
"whether",
"this",
"feedback",
"is",
"similar",
"to",
"another"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/AbstractMessageFeedback.php#L67-L77 |
neos/neos-ui | Classes/Domain/Model/Changes/Create.php | Create.canApply | public function canApply()
{
$subject = $this->getSubject();
$nodeType = $this->getNodeType();
return $subject->isNodeTypeAllowedAsChildNode($nodeType);
} | php | public function canApply()
{
$subject = $this->getSubject();
$nodeType = $this->getNodeType();
return $subject->isNodeTypeAllowedAsChildNode($nodeType);
} | [
"public",
"function",
"canApply",
"(",
")",
"{",
"$",
"subject",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
";",
"$",
"nodeType",
"=",
"$",
"this",
"->",
"getNodeType",
"(",
")",
";",
"return",
"$",
"subject",
"->",
"isNodeTypeAllowedAsChildNode",
"... | Check if the new node's node type is allowed in the requested position
@return boolean | [
"Check",
"if",
"the",
"new",
"node",
"s",
"node",
"type",
"is",
"allowed",
"in",
"the",
"requested",
"position"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/Create.php#L40-L46 |
neos/neos-ui | Classes/Domain/Model/Changes/Create.php | Create.apply | public function apply()
{
if ($this->canApply()) {
$subject = $this->getSubject();
$this->createNode($subject);
$this->updateWorkspaceInfo();
}
} | php | public function apply()
{
if ($this->canApply()) {
$subject = $this->getSubject();
$this->createNode($subject);
$this->updateWorkspaceInfo();
}
} | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"subject",
"=",
"$",
"this",
"->",
"getSubject",
"(",
")",
";",
"$",
"this",
"->",
"createNode",
"(",
"$",
"subject",
")",
";",
"$",
... | Create a new node beneath the subject
@return void | [
"Create",
"a",
"new",
"node",
"beneath",
"the",
"subject"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/Create.php#L53-L60 |
neos/neos-ui | Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php | NeosUiDefaultNodesOperation.evaluate | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
list($siteNode, $documentNode) = $flowQuery->getContext();
list($baseNodeType, $loadingDepth, $toggledNodes, $clipboardNodeContextPath) = $arguments;
// Collect all parents of documentNode up to siteNode
$parents = [... | php | public function evaluate(FlowQuery $flowQuery, array $arguments)
{
list($siteNode, $documentNode) = $flowQuery->getContext();
list($baseNodeType, $loadingDepth, $toggledNodes, $clipboardNodeContextPath) = $arguments;
// Collect all parents of documentNode up to siteNode
$parents = [... | [
"public",
"function",
"evaluate",
"(",
"FlowQuery",
"$",
"flowQuery",
",",
"array",
"$",
"arguments",
")",
"{",
"list",
"(",
"$",
"siteNode",
",",
"$",
"documentNode",
")",
"=",
"$",
"flowQuery",
"->",
"getContext",
"(",
")",
";",
"list",
"(",
"$",
"ba... | {@inheritdoc}
@param FlowQuery $flowQuery the FlowQuery object
@param array $arguments the arguments for this operation
@return void | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php#L63-L107 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/ReloadDocument.php | ReloadDocument.serializePayload | public function serializePayload(ControllerContext $controllerContext)
{
if (!$this->node) {
return [];
}
if ($documentNode = $this->nodeService->getClosestDocument($this->node)) {
return [
'uri' => $this->linkingService->createNodeUri($controllerConte... | php | public function serializePayload(ControllerContext $controllerContext)
{
if (!$this->node) {
return [];
}
if ($documentNode = $this->nodeService->getClosestDocument($this->node)) {
return [
'uri' => $this->linkingService->createNodeUri($controllerConte... | [
"public",
"function",
"serializePayload",
"(",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"node",
")",
"{",
"return",
"[",
"]",
";",
"}",
"if",
"(",
"$",
"documentNode",
"=",
"$",
"this",
"->",
"nodeServic... | Serialize the payload for this feedback
@param ControllerContext $controllerContext
@return mixed | [
"Serialize",
"the",
"payload",
"for",
"this",
"feedback"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/ReloadDocument.php#L103-L115 |
neos/neos-ui | Classes/TypeConverter/UiDependentImageSerializer.php | UiDependentImageSerializer.convertFrom | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
$activationHelper = $this->objectManager->get(ActivationHelper::class);
$innerConverter = $this->objectManager->get(ImageInterfaceArrayPresenter::cl... | php | public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
{
$activationHelper = $this->objectManager->get(ActivationHelper::class);
$innerConverter = $this->objectManager->get(ImageInterfaceArrayPresenter::cl... | [
"public",
"function",
"convertFrom",
"(",
"$",
"source",
",",
"$",
"targetType",
",",
"array",
"$",
"convertedChildProperties",
"=",
"[",
"]",
",",
"PropertyMappingConfigurationInterface",
"$",
"configuration",
"=",
"null",
")",
"{",
"$",
"activationHelper",
"=",
... | Converts the given source ImageInterface depending on which UI is active.
@param mixed $source
@param string $targetType
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface|null $configuration
@return mixed|\Neos\Error\Messages\Error|\Neos\Flow\Validation\Error|string | [
"Converts",
"the",
"given",
"source",
"ImageInterface",
"depending",
"on",
"which",
"UI",
"is",
"active",
"."
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/TypeConverter/UiDependentImageSerializer.php#L42-L53 |
neos/neos-ui | Classes/Domain/Model/Changes/MoveAfter.php | MoveAfter.apply | public function apply()
{
if ($this->canApply()) {
$before = self::cloneNodeWithNodeData($this->getSubject());
$parent = $before->getParent();
if ($this->nodeNameAvailableBelowNode($this->getSiblingNode()->getParent(), $this->getSubject())) {
$this->getSu... | php | public function apply()
{
if ($this->canApply()) {
$before = self::cloneNodeWithNodeData($this->getSubject());
$parent = $before->getParent();
if ($this->nodeNameAvailableBelowNode($this->getSiblingNode()->getParent(), $this->getSubject())) {
$this->getSu... | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"before",
"=",
"self",
"::",
"cloneNodeWithNodeData",
"(",
"$",
"this",
"->",
"getSubject",
"(",
")",
")",
";",
"$",
"parent",
"=",
"$"... | Applies this change
@return void | [
"Applies",
"this",
"change"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/MoveAfter.php#L40-L60 |
neos/neos-ui | Classes/ContentRepository/Service/NodeService.php | NodeService.getClosestDocument | public function getClosestDocument(NodeInterface $node)
{
if ($node->getNodeType()->isOfType('Neos.Neos:Document')) {
return $node;
}
$flowQuery = new FlowQuery([$node]);
return $flowQuery->closest('[instanceof Neos.Neos:Document]')->get(0);
} | php | public function getClosestDocument(NodeInterface $node)
{
if ($node->getNodeType()->isOfType('Neos.Neos:Document')) {
return $node;
}
$flowQuery = new FlowQuery([$node]);
return $flowQuery->closest('[instanceof Neos.Neos:Document]')->get(0);
} | [
"public",
"function",
"getClosestDocument",
"(",
"NodeInterface",
"$",
"node",
")",
"{",
"if",
"(",
"$",
"node",
"->",
"getNodeType",
"(",
")",
"->",
"isOfType",
"(",
"'Neos.Neos:Document'",
")",
")",
"{",
"return",
"$",
"node",
";",
"}",
"$",
"flowQuery",... | Helper method to retrieve the closest document for a node
@param NodeInterface $node
@return NodeInterface | [
"Helper",
"method",
"to",
"retrieve",
"the",
"closest",
"document",
"for",
"a",
"node"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/NodeService.php#L55-L64 |
neos/neos-ui | Classes/ContentRepository/Service/NodeService.php | NodeService.getNodeFromContextPath | public function getNodeFromContextPath($contextPath, Site $site = null, Domain $domain = null, $includeAll = false)
{
$nodePathAndContext = NodePaths::explodeContextPath($contextPath);
$nodePath = $nodePathAndContext['nodePath'];
$workspaceName = $nodePathAndContext['workspaceName'];
... | php | public function getNodeFromContextPath($contextPath, Site $site = null, Domain $domain = null, $includeAll = false)
{
$nodePathAndContext = NodePaths::explodeContextPath($contextPath);
$nodePath = $nodePathAndContext['nodePath'];
$workspaceName = $nodePathAndContext['workspaceName'];
... | [
"public",
"function",
"getNodeFromContextPath",
"(",
"$",
"contextPath",
",",
"Site",
"$",
"site",
"=",
"null",
",",
"Domain",
"$",
"domain",
"=",
"null",
",",
"$",
"includeAll",
"=",
"false",
")",
"{",
"$",
"nodePathAndContext",
"=",
"NodePaths",
"::",
"e... | Converts a given context path to a node object
@param string $contextPath
@return NodeInterface|Error | [
"Converts",
"a",
"given",
"context",
"path",
"to",
"a",
"node",
"object"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/NodeService.php#L83-L119 |
neos/neos-ui | Classes/ContentRepository/Service/NodeService.php | NodeService.nodeExistsInWorkspace | public function nodeExistsInWorkspace(NodeInterface $node, Workspace $workspace)
{
$context = ['workspaceName' => $workspace->getName()];
$flowQuery = new FlowQuery([$node]);
return $flowQuery->context($context)->count() > 0;
} | php | public function nodeExistsInWorkspace(NodeInterface $node, Workspace $workspace)
{
$context = ['workspaceName' => $workspace->getName()];
$flowQuery = new FlowQuery([$node]);
return $flowQuery->context($context)->count() > 0;
} | [
"public",
"function",
"nodeExistsInWorkspace",
"(",
"NodeInterface",
"$",
"node",
",",
"Workspace",
"$",
"workspace",
")",
"{",
"$",
"context",
"=",
"[",
"'workspaceName'",
"=>",
"$",
"workspace",
"->",
"getName",
"(",
")",
"]",
";",
"$",
"flowQuery",
"=",
... | Checks if the given node exists in the given workspace
@param NodeInterface $node
@param Workspace $workspace
@return boolean | [
"Checks",
"if",
"the",
"given",
"node",
"exists",
"in",
"the",
"given",
"workspace"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/NodeService.php#L128-L134 |
neos/neos-ui | Classes/ContentRepository/Service/NodeService.php | NodeService.prepareContextProperties | protected function prepareContextProperties($workspaceName, array $dimensions = null)
{
$contextProperties = [
'workspaceName' => $workspaceName,
'invisibleContentShown' => false,
'removedContentShown' => false
];
if ($workspaceName !== 'live') {
... | php | protected function prepareContextProperties($workspaceName, array $dimensions = null)
{
$contextProperties = [
'workspaceName' => $workspaceName,
'invisibleContentShown' => false,
'removedContentShown' => false
];
if ($workspaceName !== 'live') {
... | [
"protected",
"function",
"prepareContextProperties",
"(",
"$",
"workspaceName",
",",
"array",
"$",
"dimensions",
"=",
"null",
")",
"{",
"$",
"contextProperties",
"=",
"[",
"'workspaceName'",
"=>",
"$",
"workspaceName",
",",
"'invisibleContentShown'",
"=>",
"false",
... | Prepares the context properties for the nodes based on the given workspace and dimensions
@param string $workspaceName
@param array $dimensions
@return array | [
"Prepares",
"the",
"context",
"properties",
"for",
"the",
"nodes",
"based",
"on",
"the",
"given",
"workspace",
"and",
"dimensions"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/ContentRepository/Service/NodeService.php#L143-L160 |
neos/neos-ui | Classes/Fusion/AppendToCollectionImplementation.php | AppendToCollectionImplementation.evaluate | public function evaluate()
{
$collection = $this->fusionValue('collection');
$key = $this->fusionValue('key');
$item = $this->fusionValue('item');
if ($key) {
$collection[$key] = $item;
} else {
$collection[] = $item;
}
return $collec... | php | public function evaluate()
{
$collection = $this->fusionValue('collection');
$key = $this->fusionValue('key');
$item = $this->fusionValue('item');
if ($key) {
$collection[$key] = $item;
} else {
$collection[] = $item;
}
return $collec... | [
"public",
"function",
"evaluate",
"(",
")",
"{",
"$",
"collection",
"=",
"$",
"this",
"->",
"fusionValue",
"(",
"'collection'",
")",
";",
"$",
"key",
"=",
"$",
"this",
"->",
"fusionValue",
"(",
"'key'",
")",
";",
"$",
"item",
"=",
"$",
"this",
"->",
... | Appends an item to the given collection
@return string | [
"Appends",
"an",
"item",
"to",
"the",
"given",
"collection"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Fusion/AppendToCollectionImplementation.php#L23-L36 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/UpdateWorkspaceInfo.php | UpdateWorkspaceInfo.isSimilarTo | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof UpdateWorkspaceInfo) {
return false;
}
return $this->getWorkspace() === $feedback->getWorkspace();
} | php | public function isSimilarTo(FeedbackInterface $feedback)
{
if (!$feedback instanceof UpdateWorkspaceInfo) {
return false;
}
return $this->getWorkspace() === $feedback->getWorkspace();
} | [
"public",
"function",
"isSimilarTo",
"(",
"FeedbackInterface",
"$",
"feedback",
")",
"{",
"if",
"(",
"!",
"$",
"feedback",
"instanceof",
"UpdateWorkspaceInfo",
")",
"{",
"return",
"false",
";",
"}",
"return",
"$",
"this",
"->",
"getWorkspace",
"(",
")",
"===... | Checks whether this feedback is similar to another
@param FeedbackInterface $feedback
@return boolean | [
"Checks",
"whether",
"this",
"feedback",
"is",
"similar",
"to",
"another"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/UpdateWorkspaceInfo.php#L81-L88 |
neos/neos-ui | Classes/Domain/Model/Feedback/Operations/UpdateWorkspaceInfo.php | UpdateWorkspaceInfo.serializePayload | public function serializePayload(ControllerContext $controllerContext)
{
return [
'name' => $this->getWorkspace()->getName(),
'publishableNodes' => $this->workspaceService->getPublishableNodeInfo(
$this->getWorkspace()
),
'baseWorkspace' => $th... | php | public function serializePayload(ControllerContext $controllerContext)
{
return [
'name' => $this->getWorkspace()->getName(),
'publishableNodes' => $this->workspaceService->getPublishableNodeInfo(
$this->getWorkspace()
),
'baseWorkspace' => $th... | [
"public",
"function",
"serializePayload",
"(",
"ControllerContext",
"$",
"controllerContext",
")",
"{",
"return",
"[",
"'name'",
"=>",
"$",
"this",
"->",
"getWorkspace",
"(",
")",
"->",
"getName",
"(",
")",
",",
"'publishableNodes'",
"=>",
"$",
"this",
"->",
... | Serialize the payload for this feedback
@return mixed | [
"Serialize",
"the",
"payload",
"for",
"this",
"feedback"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Feedback/Operations/UpdateWorkspaceInfo.php#L95-L104 |
neos/neos-ui | Classes/Domain/Model/Changes/CopyInto.php | CopyInto.apply | public function apply()
{
if ($this->canApply()) {
$nodeName = $this->generateUniqueNodeName($this->getParentNode());
$node = $this->getSubject()->copyInto($this->getParentNode(), $nodeName);
$this->finish($node);
}
} | php | public function apply()
{
if ($this->canApply()) {
$nodeName = $this->generateUniqueNodeName($this->getParentNode());
$node = $this->getSubject()->copyInto($this->getParentNode(), $nodeName);
$this->finish($node);
}
} | [
"public",
"function",
"apply",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canApply",
"(",
")",
")",
"{",
"$",
"nodeName",
"=",
"$",
"this",
"->",
"generateUniqueNodeName",
"(",
"$",
"this",
"->",
"getParentNode",
"(",
")",
")",
";",
"$",
"node",
... | Applies this change
@return void | [
"Applies",
"this",
"change"
] | train | https://github.com/neos/neos-ui/blob/6770c243f0750bbef82d6f14b5c3e580493e068c/Classes/Domain/Model/Changes/CopyInto.php#L74-L81 |
sstalle/php7cc | src/NodeAnalyzer/Reflection/FunctionLike/FunctionCalleeReflector.php | FunctionCalleeReflector.supports | public function supports($node)
{
if (!($node instanceof Expr\FuncCall)) {
return false;
}
return $node->name instanceof Name && $this->functionReflector->supports($node->name->toString());
} | php | public function supports($node)
{
if (!($node instanceof Expr\FuncCall)) {
return false;
}
return $node->name instanceof Name && $this->functionReflector->supports($node->name->toString());
} | [
"public",
"function",
"supports",
"(",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"node",
"instanceof",
"Expr",
"\\",
"FuncCall",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"$",
"node",
"->",
"name",
"instanceof",
"Name",
"&&",
"$",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeAnalyzer/Reflection/FunctionLike/FunctionCalleeReflector.php#L35-L42 |
sstalle/php7cc | src/NodeVisitor/YieldInExpressionContextVisitor.php | YieldInExpressionContextVisitor.enterNode | public function enterNode(Node $node)
{
if ($node instanceof Node\Expr\Yield_ && !$this->expressionStack->isEmpty()) {
$startTokenPosition = $node->getAttribute('startTokenPos');
$endTokenPosition = $node->getAttribute('endTokenPos');
if (!$this->tokenCollection->isToken... | php | public function enterNode(Node $node)
{
if ($node instanceof Node\Expr\Yield_ && !$this->expressionStack->isEmpty()) {
$startTokenPosition = $node->getAttribute('startTokenPos');
$endTokenPosition = $node->getAttribute('endTokenPos');
if (!$this->tokenCollection->isToken... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"if",
"(",
"$",
"node",
"instanceof",
"Node",
"\\",
"Expr",
"\\",
"Yield_",
"&&",
"!",
"$",
"this",
"->",
"expressionStack",
"->",
"isEmpty",
"(",
")",
")",
"{",
"$",
"startTokenPos... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/YieldInExpressionContextVisitor.php#L28-L45 |
sstalle/php7cc | src/NodeVisitor/YieldInExpressionContextVisitor.php | YieldInExpressionContextVisitor.leaveNode | public function leaveNode(Node $node)
{
if (!$this->expressionStack->isEmpty() && $node === $this->expressionStack->top()) {
$this->expressionStack->pop();
}
} | php | public function leaveNode(Node $node)
{
if (!$this->expressionStack->isEmpty() && $node === $this->expressionStack->top()) {
$this->expressionStack->pop();
}
} | [
"public",
"function",
"leaveNode",
"(",
"Node",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"expressionStack",
"->",
"isEmpty",
"(",
")",
"&&",
"$",
"node",
"===",
"$",
"this",
"->",
"expressionStack",
"->",
"top",
"(",
")",
")",
"{",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/YieldInExpressionContextVisitor.php#L50-L55 |
sstalle/php7cc | src/NodeVisitor/YieldInExpressionContextVisitor.php | YieldInExpressionContextVisitor.isIgnoredExpressionType | private function isIgnoredExpressionType(Node\Expr $expr)
{
/**
* We don't care about assignments, because:
* 1. If the assigned expression ($expr->expr) is a yield expression, then:
* a. It had been added before moving to 7.x and is parenthesized (assigning
* yield ... | php | private function isIgnoredExpressionType(Node\Expr $expr)
{
/**
* We don't care about assignments, because:
* 1. If the assigned expression ($expr->expr) is a yield expression, then:
* a. It had been added before moving to 7.x and is parenthesized (assigning
* yield ... | [
"private",
"function",
"isIgnoredExpressionType",
"(",
"Node",
"\\",
"Expr",
"$",
"expr",
")",
"{",
"/**\n * We don't care about assignments, because:\n * 1. If the assigned expression ($expr->expr) is a yield expression, then:\n * a. It had been added before moving to... | @param Node\Expr $expr
@return bool | [
"@param",
"Node",
"\\",
"Expr",
"$expr"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/YieldInExpressionContextVisitor.php#L62-L85 |
sstalle/php7cc | src/NodeVisitor/SetcookieEmptyNameVisitor.php | SetcookieEmptyNameVisitor.enterNode | public function enterNode(Node $node)
{
if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, self::$setcookieFamilyFunctions)) {
return;
}
/** @var Node\Expr\FuncCall $node */
$cookieNameArgumentValue = isset($node->args[0]) ? $node->args[0]->value : null;
... | php | public function enterNode(Node $node)
{
if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, self::$setcookieFamilyFunctions)) {
return;
}
/** @var Node\Expr\FuncCall $node */
$cookieNameArgumentValue = isset($node->args[0]) ? $node->args[0]->value : null;
... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"functionAnalyzer",
"->",
"isFunctionCallByStaticName",
"(",
"$",
"node",
",",
"self",
"::",
"$",
"setcookieFamilyFunctions",
")",
")",
"{",
"return",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/SetcookieEmptyNameVisitor.php#L37-L56 |
sstalle/php7cc | src/NodeAnalyzer/FunctionAnalyzer.php | FunctionAnalyzer.isFunctionCallByStaticName | public function isFunctionCallByStaticName(Node $node, $checkedFunctionName)
{
$isFunctionCallByStaticName = $node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name;
if (!$isFunctionCallByStaticName) {
return $isFunctionCallByStaticName;
}
$calledFunction... | php | public function isFunctionCallByStaticName(Node $node, $checkedFunctionName)
{
$isFunctionCallByStaticName = $node instanceof Node\Expr\FuncCall && $node->name instanceof Node\Name;
if (!$isFunctionCallByStaticName) {
return $isFunctionCallByStaticName;
}
$calledFunction... | [
"public",
"function",
"isFunctionCallByStaticName",
"(",
"Node",
"$",
"node",
",",
"$",
"checkedFunctionName",
")",
"{",
"$",
"isFunctionCallByStaticName",
"=",
"$",
"node",
"instanceof",
"Node",
"\\",
"Expr",
"\\",
"FuncCall",
"&&",
"$",
"node",
"->",
"name",
... | @param Node $node
@param string|string[] $checkedFunctionName If an array as passed, function names should be keys
@return bool | [
"@param",
"Node",
"$node",
"@param",
"string|string",
"[]",
"$checkedFunctionName",
"If",
"an",
"array",
"as",
"passed",
"function",
"names",
"should",
"be",
"keys"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeAnalyzer/FunctionAnalyzer.php#L29-L41 |
sstalle/php7cc | src/NodeAnalyzer/FunctionAnalyzer.php | FunctionAnalyzer.getByReferenceCallArguments | public function getByReferenceCallArguments($callNode)
{
$byReferenceArguments = $callNode->args;
if (!$this->calleeReflector->supports($callNode)) {
return $byReferenceArguments;
}
$reflection = $this->calleeReflector->reflect($callNode);
$byReferenceParameterPo... | php | public function getByReferenceCallArguments($callNode)
{
$byReferenceArguments = $callNode->args;
if (!$this->calleeReflector->supports($callNode)) {
return $byReferenceArguments;
}
$reflection = $this->calleeReflector->reflect($callNode);
$byReferenceParameterPo... | [
"public",
"function",
"getByReferenceCallArguments",
"(",
"$",
"callNode",
")",
"{",
"$",
"byReferenceArguments",
"=",
"$",
"callNode",
"->",
"args",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"calleeReflector",
"->",
"supports",
"(",
"$",
"callNode",
")",
")",... | Returns arguments passed by reference, if reflection for the called function
is available. Otherwise returns all the arguments.
@param Node\Expr\FuncCall|Node\Expr\StaticCall|Node\Expr\MethodCall $callNode
@return array|Node\Arg[] | [
"Returns",
"arguments",
"passed",
"by",
"reference",
"if",
"reflection",
"for",
"the",
"called",
"function",
"is",
"available",
".",
"Otherwise",
"returns",
"all",
"the",
"arguments",
"."
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeAnalyzer/FunctionAnalyzer.php#L51-L63 |
sstalle/php7cc | src/Error/CheckError.php | CheckError.generateText | protected function generateText()
{
$text = $this->getRawText();
if ($this->getLine()) {
$text = sprintf('Line %d. %s', $this->getLine(), $text);
}
return $text . '. Processing aborted.';
} | php | protected function generateText()
{
$text = $this->getRawText();
if ($this->getLine()) {
$text = sprintf('Line %d. %s', $this->getLine(), $text);
}
return $text . '. Processing aborted.';
} | [
"protected",
"function",
"generateText",
"(",
")",
"{",
"$",
"text",
"=",
"$",
"this",
"->",
"getRawText",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getLine",
"(",
")",
")",
"{",
"$",
"text",
"=",
"sprintf",
"(",
"'Line %d. %s'",
",",
"$",
"thi... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/Error/CheckError.php#L12-L20 |
sstalle/php7cc | src/NodeVisitor/BitwiseShiftVisitor.php | BitwiseShiftVisitor.enterNode | public function enterNode(Node $node)
{
$isLeftShift = $node instanceof Node\Expr\BinaryOp\ShiftLeft;
$isRightShift = $node instanceof Node\Expr\BinaryOp\ShiftRight;
if (!$isLeftShift && !$isRightShift) {
return;
}
$rightOperand = $node->right;
if ($right... | php | public function enterNode(Node $node)
{
$isLeftShift = $node instanceof Node\Expr\BinaryOp\ShiftLeft;
$isRightShift = $node instanceof Node\Expr\BinaryOp\ShiftRight;
if (!$isLeftShift && !$isRightShift) {
return;
}
$rightOperand = $node->right;
if ($right... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"$",
"isLeftShift",
"=",
"$",
"node",
"instanceof",
"Node",
"\\",
"Expr",
"\\",
"BinaryOp",
"\\",
"ShiftLeft",
";",
"$",
"isRightShift",
"=",
"$",
"node",
"instanceof",
"Node",
"\\",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/BitwiseShiftVisitor.php#L33-L55 |
sstalle/php7cc | src/NodeVisitor/InvalidOctalLiteralVisitor.php | InvalidOctalLiteralVisitor.enterNode | public function enterNode(Node $node)
{
if (!$node instanceof Node\Scalar\LNumber) {
return;
}
$originalNumberValue = $node->getAttribute('originalValue', '');
if (preg_match('/^0[0-7]*[89]+/', $originalNumberValue)) {
$this->addContextMessage(
... | php | public function enterNode(Node $node)
{
if (!$node instanceof Node\Scalar\LNumber) {
return;
}
$originalNumberValue = $node->getAttribute('originalValue', '');
if (preg_match('/^0[0-7]*[89]+/', $originalNumberValue)) {
$this->addContextMessage(
... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"node",
"instanceof",
"Node",
"\\",
"Scalar",
"\\",
"LNumber",
")",
"{",
"return",
";",
"}",
"$",
"originalNumberValue",
"=",
"$",
"node",
"->",
"getAttribute",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/InvalidOctalLiteralVisitor.php#L15-L29 |
sstalle/php7cc | src/CodePreprocessor/ShebangRemover.php | ShebangRemover.preprocess | public function preprocess($code)
{
$matches = array();
preg_match(static::SHEBANG_REGEXP, $code, $matches);
return $matches ? substr($code, strlen($matches[0])) : $code;
} | php | public function preprocess($code)
{
$matches = array();
preg_match(static::SHEBANG_REGEXP, $code, $matches);
return $matches ? substr($code, strlen($matches[0])) : $code;
} | [
"public",
"function",
"preprocess",
"(",
"$",
"code",
")",
"{",
"$",
"matches",
"=",
"array",
"(",
")",
";",
"preg_match",
"(",
"static",
"::",
"SHEBANG_REGEXP",
",",
"$",
"code",
",",
"$",
"matches",
")",
";",
"return",
"$",
"matches",
"?",
"substr",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/CodePreprocessor/ShebangRemover.php#L12-L18 |
sstalle/php7cc | src/NodeVisitor/ForeachVisitor.php | ForeachVisitor.enterNode | public function enterNode(Node $node)
{
parent::enterNode($node);
if ($this->isTargetLoopNode($node)) {
$this->checkNestedByReferenceForeach($node);
} elseif (!$this->getCurrentLoopStack()->isEmpty()) {
$this->checkInternalArrayPointerAccessInByValueForeach($node);
... | php | public function enterNode(Node $node)
{
parent::enterNode($node);
if ($this->isTargetLoopNode($node)) {
$this->checkNestedByReferenceForeach($node);
} elseif (!$this->getCurrentLoopStack()->isEmpty()) {
$this->checkInternalArrayPointerAccessInByValueForeach($node);
... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"parent",
"::",
"enterNode",
"(",
"$",
"node",
")",
";",
"if",
"(",
"$",
"this",
"->",
"isTargetLoopNode",
"(",
"$",
"node",
")",
")",
"{",
"$",
"this",
"->",
"checkNestedByReferenc... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/ForeachVisitor.php#L53-L64 |
sstalle/php7cc | src/NodeVisitor/ForeachVisitor.php | ForeachVisitor.hasFunctionCallWithForeachArgument | protected function hasFunctionCallWithForeachArgument(Node $node, array $functions, $skippedByRefType = null)
{
if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, $functions)) {
return false;
}
/** @var Node\Expr\FuncCall $node */
foreach ($node->args as $ar... | php | protected function hasFunctionCallWithForeachArgument(Node $node, array $functions, $skippedByRefType = null)
{
if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, $functions)) {
return false;
}
/** @var Node\Expr\FuncCall $node */
foreach ($node->args as $ar... | [
"protected",
"function",
"hasFunctionCallWithForeachArgument",
"(",
"Node",
"$",
"node",
",",
"array",
"$",
"functions",
",",
"$",
"skippedByRefType",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"functionAnalyzer",
"->",
"isFunctionCallByStaticName",... | @param Node $node
@param array $functions
@param null|bool $skippedByRefType Reference type (by value/by reference) to skip
@return bool | [
"@param",
"Node",
"$node",
"@param",
"array",
"$functions",
"@param",
"null|bool",
"$skippedByRefType",
"Reference",
"type",
"(",
"by",
"value",
"/",
"by",
"reference",
")",
"to",
"skip"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/ForeachVisitor.php#L107-L130 |
sstalle/php7cc | src/NodeVisitor/ForeachVisitor.php | ForeachVisitor.getForeachVariableName | protected function getForeachVariableName(Node\Stmt\Foreach_ $foreach)
{
if ($foreach->expr instanceof Node\Expr\Variable) {
return $foreach->expr->name;
} elseif (($foreach->expr instanceof Node\Expr\Assign || $foreach->expr instanceof Node\Expr\AssignRef)
&& $foreach->expr-... | php | protected function getForeachVariableName(Node\Stmt\Foreach_ $foreach)
{
if ($foreach->expr instanceof Node\Expr\Variable) {
return $foreach->expr->name;
} elseif (($foreach->expr instanceof Node\Expr\Assign || $foreach->expr instanceof Node\Expr\AssignRef)
&& $foreach->expr-... | [
"protected",
"function",
"getForeachVariableName",
"(",
"Node",
"\\",
"Stmt",
"\\",
"Foreach_",
"$",
"foreach",
")",
"{",
"if",
"(",
"$",
"foreach",
"->",
"expr",
"instanceof",
"Node",
"\\",
"Expr",
"\\",
"Variable",
")",
"{",
"return",
"$",
"foreach",
"->... | @param Node\Stmt\Foreach_ $foreach
@return Node\Expr|string|void | [
"@param",
"Node",
"\\",
"Stmt",
"\\",
"Foreach_",
"$foreach"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/ForeachVisitor.php#L189-L200 |
sstalle/php7cc | src/NodeVisitor/GlobalVariableVariableVisitor.php | GlobalVariableVariableVisitor.enterNode | public function enterNode(Node $node)
{
if (!$node instanceof Node\Stmt\Global_) {
return;
}
foreach ($node->vars as $globalVariable) {
if (!(
$globalVariable->name instanceof Node\Expr\PropertyFetch
|| $globalVariable->name instanceof... | php | public function enterNode(Node $node)
{
if (!$node instanceof Node\Stmt\Global_) {
return;
}
foreach ($node->vars as $globalVariable) {
if (!(
$globalVariable->name instanceof Node\Expr\PropertyFetch
|| $globalVariable->name instanceof... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"node",
"instanceof",
"Node",
"\\",
"Stmt",
"\\",
"Global_",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"$",
"node",
"->",
"vars",
"as",
"$",
"globalVariab... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/GlobalVariableVariableVisitor.php#L15-L44 |
sstalle/php7cc | src/NodeVisitor/RemovedFunctionCallVisitor.php | RemovedFunctionCallVisitor.enterNode | public function enterNode(Node $node)
{
if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, $this->removedFunctionNames)) {
return;
}
/** @var Node\Expr\FuncCall $node */
$this->addContextMessage(
sprintf('Removed function "%s" called', $node->nam... | php | public function enterNode(Node $node)
{
if (!$this->functionAnalyzer->isFunctionCallByStaticName($node, $this->removedFunctionNames)) {
return;
}
/** @var Node\Expr\FuncCall $node */
$this->addContextMessage(
sprintf('Removed function "%s" called', $node->nam... | [
"public",
"function",
"enterNode",
"(",
"Node",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"functionAnalyzer",
"->",
"isFunctionCallByStaticName",
"(",
"$",
"node",
",",
"$",
"this",
"->",
"removedFunctionNames",
")",
")",
"{",
"return",
";"... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeVisitor/RemovedFunctionCallVisitor.php#L158-L169 |
sstalle/php7cc | src/Infrastructure/PHP7CCCommand.php | PHP7CCCommand.configure | protected function configure()
{
$this->setName(static::COMMAND_NAME)
->setDescription('Checks PHP 5.3 - 5.6 code for compatibility with PHP7')
->addArgument(
static::PATHS_ARGUMENT_NAME,
InputArgument::REQUIRED | InputArgument::IS_ARRAY,
... | php | protected function configure()
{
$this->setName(static::COMMAND_NAME)
->setDescription('Checks PHP 5.3 - 5.6 code for compatibility with PHP7')
->addArgument(
static::PATHS_ARGUMENT_NAME,
InputArgument::REQUIRED | InputArgument::IS_ARRAY,
... | [
"protected",
"function",
"configure",
"(",
")",
"{",
"$",
"this",
"->",
"setName",
"(",
"static",
"::",
"COMMAND_NAME",
")",
"->",
"setDescription",
"(",
"'Checks PHP 5.3 - 5.6 code for compatibility with PHP7'",
")",
"->",
"addArgument",
"(",
"static",
"::",
"PATHS... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/Infrastructure/PHP7CCCommand.php#L46-L90 |
sstalle/php7cc | src/Infrastructure/PHP7CCCommand.php | PHP7CCCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$paths = $input->getArgument(static::PATHS_ARGUMENT_NAME);
foreach ($paths as $path) {
if (!is_file($path) && !is_dir($path)) {
$output->writeln(sprintf('Path %s must be a file or a directory', $... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$paths = $input->getArgument(static::PATHS_ARGUMENT_NAME);
foreach ($paths as $path) {
if (!is_file($path) && !is_dir($path)) {
$output->writeln(sprintf('Path %s must be a file or a directory', $... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"paths",
"=",
"$",
"input",
"->",
"getArgument",
"(",
"static",
"::",
"PATHS_ARGUMENT_NAME",
")",
";",
"foreach",
"(",
"$",
"paths"... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/Infrastructure/PHP7CCCommand.php#L95-L153 |
sstalle/php7cc | src/NodeAnalyzer/Reflection/FunctionLike/AbstractCalleeReflector.php | AbstractCalleeReflector.reflect | final public function reflect($node)
{
if (!$this->supports($node)) {
throw new UnsupportedNodeTypeException(sprintf('Unsupported node type %s', get_class($node)));
}
return $this->doGetCalleeReflection($node);
} | php | final public function reflect($node)
{
if (!$this->supports($node)) {
throw new UnsupportedNodeTypeException(sprintf('Unsupported node type %s', get_class($node)));
}
return $this->doGetCalleeReflection($node);
} | [
"final",
"public",
"function",
"reflect",
"(",
"$",
"node",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"supports",
"(",
"$",
"node",
")",
")",
"{",
"throw",
"new",
"UnsupportedNodeTypeException",
"(",
"sprintf",
"(",
"'Unsupported node type %s'",
",",
"g... | {@inheritdoc} | [
"{"
] | train | https://github.com/sstalle/php7cc/blob/d20fa7d7d381fed050b5d18a094103fc41fa2911/src/NodeAnalyzer/Reflection/FunctionLike/AbstractCalleeReflector.php#L14-L21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.