> On 08 Aug 2015, at 18:57, Bruno Reis <
bruno....@gmail.com> wrote:
>
> I'm going a little further on my understanding of the cmf now. I've being reading docs and debugging a lot but still have some confusion in my mind. Please help.
>
> What are workspaces? I don't see it explained on the docs, but I see this term used a lot.
workspaces are essentially separate mount points .. essentially it allows you to have many root paths .. some people use this for example to have one workspace for their media files shared with multiple independent workspaces for different websites.
it is also often used to have one workspace for staging and another for production. there are ways to clone workspaces and copy/merge content between workspaces.
BTW when ever you are wondering about a PHPCR concept .. you can also search for the same concept with JCR .. often there is more content on the web discussing JCR ..
> I understand a doc is an object persisted by phpcr, normally mapped with @Document. But, I had some problems because some places require a "NodeInterface" implementation.
>
> Looking at this interface, it says that "The Node interface represents a node in a workspace.". And I also found some info about The Node field mapping" (
http://doctrine-phpcr-odm.readthedocs.org/en/latest/reference/phpcr-access.html").
The “in a workspace” part is only really relevant to you if you have multiple workspaces.
> I also see that AbstractBlock do not implement the NodeInterface and also do not use a node field mapping.
PHPCR fundamentally is a tree of nodes attached to the root or a child node. PHPCR ODM maps document state to nodes, which kind of hides the concept of Nodes from the user ..
BTW there is also a NodeInterface part of KnpMenu which is a different thing entirely.
> So, an AbstractBlock or SimpleBlock is not a node in the workspace? (I see it implements a ChildInterface.)
>
> Please Help!
>
> Just so you know, I started looking at that because I've finished a first iteration of a content structure and I want to refactor it to use best practices.
I would recommend reading
http://wiki.apache.org/jackrabbit/DavidsModel
However do note that he is talking about working with JCR on the node level .. and most CMF users work on the ODM level (ie. PHP classes) which is a much more ridged way of defining structure than a normal PHPCR node is .. effectively PHPCR ODM classes are essentially very restrictive node types (indeed we have pondered to allow generation of node types from PHPCR ODM classes).
> I also had some problems because I created some Documents that do not implement that interface, but those would not show in the admin. Why? Because MenuNode and another type that I do not remember now will filter the getChildren method and ignore objects that do not implement that.
again MenuNode has nothing to do with PHPCR.
regards,
Lukas Kahwe Smith
sm...@pooteeweet.org