-
Notifications
You must be signed in to change notification settings - Fork 33
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
[WIP] Added Templating Helper for PHP templates #62
Conversation
* Get the extension name | ||
* | ||
* @return string | ||
*/ | ||
public function getName() | ||
{ | ||
return 'cmf_extension'; | ||
return 'cmf'; |
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.
not sure if this is a correct name, but I don't think cmf_extension
is the correct name.
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.
should it maybe be cmf_core
?
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.
yeah well, I think I prefer cmf
then. As 'core' doesn't add much information and core is just another name for 'default things' which is also what 'cmf' only means.
seems good to me. is the name of the twig extension important? i mean, does anything rely on that? this PR will collide with #59 but i will manage to fix that :-) lets merge this one first. |
btw, we started requiring the symfony PR header - please use it when creating PR to make them more clear |
The But the name is important in PHP templates, as that's the only way to get the helper: <a ...><?php $view['extension_name']->getPrev(); ?></a> |
but should we not use cmf_core then, to follow the principels of least |
Hmm, all functions has something to do with documents, so we can call it What about overriding (if possible) the sonata block helper with the cmf helper (which also provides the methods of the sonata helper. When we combine the sonata bundles with the cmf bundles, we can make this a lot easier and just have one helper class for the blocks. tl;dr
wdyt? |
i agree with extending the sonata block helper and overriding it to provide one combined helper, that sounds logical. calling this one |
and |
Considering the Not sure about the And again we can find this phrase to be correct :) |
i thought the phrase goes |There are only two hard things in Computer what if we would just call the extension "cmf" instead of "document" or |
Works for me as well, it's just a bit less descriptive, but in the end that is what it is. |
If the stuff is not related to content/documents, it should go in another templating helper. If you look at the templating helpers in the FrameworkBundle you can see a lot of helpers. Helpers aren't related to a bundle, but to a feature. That's why I also think
|
ok, if we say we keep |
ping |
Yes, it's mergable afaics (actually, I don't know if the tests pass, you forgot to register the travis hook?) |
[WIP] Added Templating Helper for PHP templates
oh btw, do you also do a doc PR about php templating? |
Yes |
the service configuration also needed to be updated 25f3955 |
ups, thanks. do you think we can activate travis on PRs here? |
its on for everybody .. but sometimes there are simply delays |
fixes #61