-
Notifications
You must be signed in to change notification settings - Fork 14
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
IBX-9415: Added support for ContentAwareInterface in ibexa_* Twig functions #467
base: 4.6
Are you sure you want to change the base?
Conversation
@@ -4,6 +4,7 @@ | |||
{% extends 'templates/base.html.twig' %} | |||
{% block content %} | |||
{{ ez_render_field( nooverride, 'testfield' ) }} | |||
{{ ibexa_render_field( contentaware, 'testfield' ) }} |
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.
shouldnt you be testing {{ ez_render_field( contentaware, 'testfield' ) }} here and in other ez_
fixtures?
new TwigFunction( | ||
'ibexa_field_is_empty', | ||
[$this, 'isFieldEmpty'] | ||
), | ||
new TwigFunction( |
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.
minor, but there is no need to change it position in the array and complicate eventual merge up where all ez_
functions are dropped.
src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php
Outdated
Show resolved
Hide resolved
* @param string $forcedLanguage Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) | ||
* | ||
* @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType When $content is not a valid Content or ContentInfo object. | ||
* @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType When $content is not a valid Content, ContentInfo or ContentAwareInterface object. |
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.
punctuation, use Oxford comma please (yes, the punctuation here was incorrect before):
* @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType When $content is not a valid Content, ContentInfo or ContentAwareInterface object. | |
* @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType When $content is not a valid Content, ContentInfo, or ContentAwareInterface object. |
src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Related PRs:
Description:
Added support for ContentAwareInterface objects (e.g. product) to following Twing functions
For QA:
It needs to be chcked if all theses functions can instead of
content
as a first argument also work with for exampleproduct
Documentation:
Docs for all theses functions should be changed that they are working also with ContentAwareInterfaced objects