I've created the basic architecture (minus frontend view). This
comprises of Metadata, Fields and FormBuilder.
I took the liberty of transfering it to the CMF repository and updated
the "introduction" (we can move these to offical docs in future):
https://github.com/symfony-cmf/cmf-content-type/blob/master/docs/introduction.rst
Next task will be adding the (frontend) view builder (I think it will be
very similar to the Symfony Form "view", but for the frontend).
Then we need to add storage strategies - the easiest will be JSON/PHP
serializing the complex data, which will work with any underlying
storage driver. In the future we can add support for Doctrine
Embeddables / PHPCR child objects.
This is will hopefully be a rather simple component / bundle (at least
initially), but I think will be very valuable :)
p.s. the code generation I hinted at initially won't be needed I think.
User just has to create their entities. We can even support
annotations:
class NewsPage
{
/**
* @CMFContent\Field('text')
*/
property $title;
/**
* @CMFContent\Field('resource_list', {
* options = {
* repository = "news"
* glob = "symfony-cmf/*"
* }
* )
*/
property $news;
}
On Sat, Jul 09, 2016 at 12:45:35PM +0200, Wouter de Jong wrote:
> I like this idea a lot. It's like the NodeType library of Neos, which I
> like a lot.
> This would however be the first library in the CMF that implements
> front-end stuff,
> almost heading towards a fully functioning CMS like Sulu. If that's what
> we want, this
> is the missing library indeed.
> 2016-06-28 11:48 GMT+02:00 Daniel Leech <[1]
dan...@dantleech.com>:
>
> On Tue, Jun 28, 2016 at 11:38:54AM +0200, Lukas Kahwe Smith wrote:
> >
> > > On 25 Jun 2016, at 00:03, Daniel Leech <[2]
dan...@dantleech.com>
> wrote:
> > >
> > > Hello all,
> > >
> > > I think one thing that is missing in the CMF stack is a content type
> > > component.
> > >
> > > All CMS systems that I know of have a concept of a content type or
> > > similar. Content types combine storage, forms and display
> > > responsibilities for a specific type of content (e.g. article, blog
> > > post, event, person).
> > >
> > > These are different from entities/documents in that they are
> composed of
> > > both scalar and "complex" types. Complex types are composed of many
> > > scalar and potentially other complex fields.
> > >
> > > They do this by defining a metadata object describing the fields of
> the
> > > content. Each field is of a specific type and defines how its data
> > > should be stored, how its form should be displayed and how its
> content
> > > should be rendered.
> > >
> > > About a month back I sketched out some documentation:
> > >
> > >
> [3]
https://github.com/dantleech/cmf-content-type/blob/master/docs/introduction.rst
> [4]
http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/tutorials/embeddables.html
> > I guess if we do define such a format, then we can of course try to
> generate it from ODM/ORM mappings as a way to get started .. or as a
> fallback when there is no mapping.
>
> It would actually work the otherway round - the content type definition
> would generate the mapping for the ORM/ODM. The entities could either
> then be hidden away in a temporary directory or be manually created (or
> generated) by/for the user.
> >
> > regards,
> > Lukas Kahwe Smith
> > [5]
sm...@pooteeweet.org
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "symfony-cmf-devs" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [6]
symfony-cmf-de...@googlegroups.com.
> > For more options, visit [7]
https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "symfony-cmf-devs" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [8]
symfony-cmf-de...@googlegroups.com.
> For more options, visit [9]
https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony-cmf-devs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [10]
symfony-cmf-de...@googlegroups.com.
> For more options, visit [11]
https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:
dan...@dantleech.com
> 2. mailto:
dan...@dantleech.com
> 3.
https://github.com/dantleech/cmf-content-type/blob/master/docs/introduction.rst
> 4.
http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/tutorials/embeddables.html
> 5. mailto:
sm...@pooteeweet.org
> 6. mailto:
symfony-cmf-devs%2Bunsu...@googlegroups.com
> 7.
https://groups.google.com/d/optout
> 8. mailto:
symfony-cmf-devs%2Bunsu...@googlegroups.com
> 9.
https://groups.google.com/d/optout
> 10. mailto:
symfony-cmf-de...@googlegroups.com
> 11.
https://groups.google.com/d/optout