symfony-cmf / simple-cms-bundle

UNMAINTAINED - A more-than-simple cms based on the cmf components
http://cmf.symfony.com/
49 stars 45 forks source link

Add Shortcut getIdentifier and getUUID #115

Closed cbastienbaron closed 10 years ago

dbu commented 10 years ago

i am ok with that change, its not costing anything additional (as would mapping the uuid onto the document). i only have some code style that i commented.

for future pull requests: please use the PR description template as explained in https://github.com/symfony-cmf/SimpleCmsBundle/blob/master/CONTRIBUTING.md - that will make it easier for us to see what PRs are about.

dbu commented 10 years ago

@cbastienbaron sorry, did not see that you added commits. best write some comment on the PR so that i get a notification ;-) can you do the change lukas proposed and then comment again so i can merge?

dbu commented 10 years ago

ping @cbastienbaron

cbastienbaron commented 10 years ago

@dbu hope that's good ;)

dbu commented 10 years ago

looks good. will squash and merge.

dbu commented 10 years ago

merged in https://github.com/symfony-cmf/SimpleCmsBundle/commit/dec1bacbed9e324110b1c8b380189b85d7ece7f5 (github does not understand because i squashed the commits)

cbastienbaron commented 10 years ago

thanks @dbu ;)

i've a question : it is possible to have the underlying node phpcr into a block ? i don't see a property $node sniff :( there is a special reason for that ?

dbu commented 10 years ago

sorry, i don't understand what you want to do. the $node field is a phpcr node which is the lower-layer database object representing the content of the document. you should only use it if you have "dynamic properties" that you can't map on the document - if you change e.g. the title property on that node, it could be overwritten by the document.

cbastienbaron commented 10 years ago

Thks for answers, Tipical case to get UUID of node into a block document ;) it's more convenience to play with an uuid that a an absolute path even more it is dashify.

Don't know if i'm clear ( english it's not my native tongue :) )

dbu commented 10 years ago

i think the blocks do not map the node document. but you can always use the DocumentManager::getNodeForDocument method to get the node and from that the uuid.

cbastienbaron commented 10 years ago

Great usefull ;) thanks David !