-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Add implicit
ContentElementWrapping
to `Neos.Fusion:Collec…
…tion` if nodes are mapped by `Neos.Fusion:RawCollection` This package will store a reference to the currently rendered Node in the array-key `__node` whenever `Neos.Fusion:RawCollection` maps a Node to an Array. If the `Neos.Fusion:Collection` iterates and detects an array-item that has the key `__node` `Neos.Neos:ContentElementWrapping` is applied to the content automatically.
- Loading branch information
0 parents
commit 9281c42
Showing
6 changed files
with
936 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
namespace PackageFactory\AtomicFusion\Mapping\Fusion; | ||
|
||
use Neos\Flow\Annotations as Flow; | ||
use Neos\Fusion\FusionObjects\AbstractFusionObject; | ||
use Neos\Utility\ObjectAccess; | ||
|
||
/** | ||
* Fusion object to access values from current context by name | ||
*/ | ||
class GetContextImplementation extends AbstractFusionObject | ||
{ | ||
/** | ||
* @return mixed | ||
*/ | ||
public function getProperty() | ||
{ | ||
return $this->fusionValue('property'); | ||
} | ||
|
||
/** | ||
* Just return the context property | ||
* | ||
* @return mixed | ||
*/ | ||
public function evaluate() | ||
{ | ||
if ($property = $this->getProperty()) { | ||
return ObjectAccess::getProperty( $this->runtime->getCurrentContext(), $property); | ||
} else { | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Neos: | ||
Neos: | ||
fusion: | ||
autoInclude: | ||
PackageFactory.AtomicFusion.Mapping: true |
Oops, something went wrong.