-
Notifications
You must be signed in to change notification settings - Fork 19
Add Base implementation of website content resolving #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Base implementation of website content resolving #271
Conversation
1521891
to
ded692b
Compare
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Sulu\Bundle\ContentBundle\Content\Application\ContentObjects; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
$content = \array_merge($content, $result['content']); | ||
$view = \array_merge($view, $result['view']); | ||
$resolvableResources = \array_merge_recursive($resolvableResources, $result['resolvableResources']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge behave sometimes strange for nested arrays maybe we need to use array_replace
/ array_recursive_replace
Content/Application/PropertyResolver/MediaSelectionPropertyResolver.php
Outdated
Show resolved
Hide resolved
foreach ($items as $item) { | ||
$name = $item->getName(); | ||
$type = $item->getType(); | ||
if ($item instanceof SectionMetadata || $item instanceof FormMetadata) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if there is not a method to get the flatted version of the metadata without the sections for resolving.
Content/Application/PropertyResolver/MediaSelectionPropertyResolver.php
Outdated
Show resolved
Hide resolved
ded692b
to
53343e0
Compare
bd4ec5f
to
320d270
Compare
320d270
to
8f73e54
Compare
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/Prokyonn/sulu.git" | ||
} | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think we need it the other way around?
Sulu need install this fork to test it 🤔
Or does this branch has something requirements / new classes we require from sulu/sulu
?
Co-authored-by: Alexander Schranz <alexander@sulu.io>
Co-authored-by: Alexander Schranz <alexander@sulu.io>
$blockTypes = $metadata->getTypes(); | ||
$contentViews = []; | ||
foreach ($data as $block) { | ||
$type = $block['type']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not forgot to implement block visitors into the content bundle
they are required for hide and scheduled blocks.
/** | ||
* Prevent circular dependency by injecting the MetadataResolver after instantiation. | ||
*/ | ||
public function setMetadataResolver(MetadataResolver $metadataResolver): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Prevent circular dependency by injecting the MetadataResolver after instantiation. | |
*/ | |
public function setMetadataResolver(MetadataResolver $metadataResolver): void | |
/** | |
* @internal | |
* | |
* Prevent circular dependency by injecting the MetadataResolver after instantiation. | |
*/ | |
public function setMetadataResolver(MetadataResolver $metadataResolver): void |
This method should not be part of the public API.
/** | ||
* @internal This class is intended for internal use only within the package/library. Modifying or depending on this class may result in unexpected behavior and is not supported. | ||
*/ | ||
class ContentView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed we will require a $resourceCallback
function as a parameter so the Link content type can after resolving set query and anchor ontop of it. This allows modification of the loaded resource by the propertyresolver later.
Refactor ContentResolver + Add LinkPropertyResolver
Add TeaserSelectionpropertyResolver
ac2aac5
to
4d5c0c4
Compare
builds up on the following merge requests: