Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

[quick tour] updating the quick tour #802

Merged
merged 3 commits into from
Apr 2, 2017
Merged

Conversation

dbu
Copy link
Member

@dbu dbu commented Jan 25, 2017

  • removed references to createjs
  • changed code to follow best practices
  • replace references to simplecms
  • check if the walkthrough still works with the cmf standard edition sandbox, or if we first need to create some more things now.

fix #788

@dbu dbu mentioned this pull request Jan 25, 2017
3 tasks
@dbu
Copy link
Member Author

dbu commented Jan 25, 2017

or should we use the sandbox for the quick tour to avoid having to set up an AppBundle and such stuff?

@dbu dbu force-pushed the best-practices-quick-tour branch from 9ed0555 to 8cf24b4 Compare January 26, 2017 09:15
@wouterj
Copy link
Member

wouterj commented Jan 27, 2017

or should we use the sandbox for the quick tour to avoid having to set up an AppBundle and such stuff?

That's what I had in mind. Imo, people should mostly look in the quick tour, not write.

@dbu
Copy link
Member Author

dbu commented Jan 28, 2017 via email

public function load(ObjectManager $documentManager)
{
// ...
$route = new Route();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we do all this in the model chapter, or rather just show the node dump here, and go to the route chapter for adding the route?

$page->setName('new_page'); // the name of the node
$page->setName('quick-tour'); // the name of the node

vno sandbox übernehmen
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i need to update the code here.

@@ -157,6 +131,8 @@ more SEO information.
Sonata Admin
------------

TODO: rewrite for sonata admin integration split out
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this says todo...

@dbu dbu force-pushed the best-practices-quick-tour branch from 574dfb2 to 8e49370 Compare March 5, 2017 09:31
@dbu dbu changed the base branch from master to 2.0 March 5, 2017 09:32
@dbu dbu changed the title WIP [quick tour] updating the quick tour [quick tour] updating the quick tour Mar 6, 2017
@dbu
Copy link
Member Author

dbu commented Mar 6, 2017

this is ready for final review. glad for input, i might have missed places but don't see it anymore after having gone over it several times...

@dbu dbu force-pushed the best-practices-quick-tour branch 2 times, most recently from 6908096 to f4b71b9 Compare March 6, 2017 07:43
@dbu
Copy link
Member Author

dbu commented Mar 19, 2017

ping @wouterj do you want to review this or should i just merge it?

Copy link
Member

@wouterj wouterj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice job! Just read everything and commented on some things, but looks perfect in general.

@@ -25,36 +25,31 @@ the core parts of the CMS.

The CMF is created to solve this framework versus CMS dilemma. It provides
bundles, so you can easily add CMS features to your project. But it also
provides flexibility and in all cases you are using the framework, so you can
provides flexibility and you can use the underlying Symfony framework to
build custom functionality the way you want. This is called a `decoupled CMS`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that my previous sentence was all but correct, but let's improve it even more. Maybe something like:

The Symfony CMF is created to solve this framework versus CMS dilemma. It
provides bundles, so you can easily add CMS features to your project. Yet, as
you're still using the Symfony framework, you can build any custom functionality
you can think of. This flexibility is called a `decoupled CMS`_.

build custom functionality the way you want. This is called a `decoupled CMS`_.

The bundles provided by the Symfony CMF can work together, but they are also
able to work standalone. This means that you don't need to add all bundles, you
can decide to only use one of them (e.g. only the RoutingBundle or the MediaBundle).
can decide to only use one of them (e.g. only the RoutingBundle or the SeoBundle).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, SeoBundle is just the one bundle that doesn't work standalone nicely :). Maybe leave out the second example here?

extension. After that, run these commands:

.. code-block:: bash

$ cd cmf-sandbox
$ cp app/config/phpcr_doctrine_dbal.yml.dist app/config/phpcr.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Windows, cp is not available by default. Maybe we should add a comment about it:

$ cd cmf-sandbox
$ cp app/config/phpcr_doctrine_dbal.yml.dist app/config/phpcr.yml
# Or when you're on a Windows PC:
# $ copy app\config\phpcr_doctrine_dbal.yml.dist app\config\phpcr.yml
$ php bin/console doctrine:database:create
[...]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

content is updated.
Now you know the request flow, you can start editing content. While the normal
usage will be to edit content through a web interface, the CMF sandbox also
supports loading content from static files. This is mainly useful for testing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double space after "supports"

time, you'll create a page by doing it yourself.
Now that you know a little bit more about PHPCR and you know the tool to interact
with it, you can start using it yourself. In the previous chapter, you edited
a page by using a yaml file which was parsed by the fixture loader of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a Yaml file"

configuration or by tagging the router services. For instance, the router used
by the SimpleCmsBundle is a service registered by that bundle and tagged with
``cmf_routing.router``.
You see that a route like ``/company/team``, which consist of 2 "path units",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 -> two

by the SimpleCmsBundle is a service registered by that bundle and tagged with
``cmf_routing.router``.
You see that a route like ``/company/team``, which consist of 2 "path units",
has 2 documents in the PHPCR tree: ``company`` and ``team``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 -> two

contains all items implementing the ``NodeInterface`` inside the
``/cms/simple`` (since the basepath in the Standard Edition is ``/cms``).
``/cms/menu/main`` (since the basepath in the CMF Sandbox is ``/cms/menu``).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"inside the /cms/menu/main path"

persisted using PHPCR, it also needs a block document, which is located in
``Acme\DemoBundle\Document\UnitBlock``.
``AppBundle\Document\UnitBlock``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this paragraph is no longer true, is it? Maybe comment it out for now and add this block when reworking the CMF sandbox (nr. 1 priority for me after 2.0 stable).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i removed the part about the blocks being custom blocks because that is no longer true. but we do show blocks on the homepage of the sandbox.


You can also disable/enable all CMF Admin classes by configuring this on the
``cmf_core`` bundle:
By default, the Admin classes for the CMF bundles that are installed are activated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the other way around: By default, all admins are disabled. Should we change that in the integration bundle?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, you are right. i would say lets keep it that way. otherwise adding new admins would have to be considered a BC break, or we would have to be inconsistent when adding new admins. i adjusted the doc

@dbu dbu force-pushed the best-practices-quick-tour branch from f4b71b9 to a63ce48 Compare March 20, 2017 07:56
@dbu
Copy link
Member Author

dbu commented Mar 20, 2017

thanks for the feedback. pushed an update that should adress all of this.

@dbu dbu force-pushed the best-practices-quick-tour branch from a63ce48 to ba4955a Compare March 20, 2017 08:20
@wouterj wouterj merged commit 6307df0 into 2.0 Apr 2, 2017
@wouterj wouterj deleted the best-practices-quick-tour branch April 2, 2017 00:45
@wouterj wouterj removed the wip/poc label Apr 2, 2017
@dbu dbu mentioned this pull request Aug 20, 2017
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants