-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
This is my first documentation PR.. #1471
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
Conversation
Additional information | ||
---------------------- | ||
|
||
To begin with, change the ``TransportChain`` class: |
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.
to open a php bloc, you have to use double colon like
change the TransportChain class::
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.
Thanks, it's ok right now,
{ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
if (false === $container->hasDefinition('acme_mailer.transport_chain')) { |
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.
you should use !
instead of false ===
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.
I have copied / pasted the TransportChain definition. See the beginning of this page.
return; | ||
} | ||
|
||
$definition = $container->getDefinition('acme_mailer.transport_chain'); |
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.
This is wrong as it forbids using the same tag several times (as you only read the first tag)
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.
I don't understand the problem ?
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.
hmm, you edited the PR after I loaded the page but before I commented, so the comments are in the wrong place. This one should be on the line 235
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.
Like my previous comment, I don't understand the problem with this.. I have take this part of code inside a Sensio or a FOS Bundle I don't remember.
I don't know how to deal with the ".. configuration-block::". Do you have any clue ? Because this part isn't display. |
@@ -157,3 +157,86 @@ run when the container is compiled:: | |||
|
|||
$container = new ContainerBuilder(); | |||
$container->addCompilerPass(new TransportCompilerPass); | |||
|
|||
Adding additional attributes on tags |
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.
Change the case to be:
Adding additional Attributes on Tags
The rough rule is to capitalize nouns.
} | ||
} | ||
|
||
Take care of ``$attributes`` variable. Because you can use the same tag many times on the same service, ``$attributes`` is an array of attributes for each tag that refers to the same service. |
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.
I like what you're doing here, but I think we can explain what this $attributes
variable is even more. Specifically, $attributes
is an array of all of the tag details for each acme_mailer.transport
tag that the service has (because a service may be tagged multiple times with the same tag). With a few more details, I think we'll have a better idea of why we have 2 foreach nested statements here.
Also, be sure to break your line after the first word that crosses the 72nd character :)
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.
I'm quite limited with this...
Do I have to add a other example with 2 TransportChain with the same tag ?
Hey Thomas! Great PR man, and welcome to the docs :). I've just added a few more comments - but everything is looking great. Thanks! |
|
||
Change the service delaration: | ||
|
||
.. configuration-block:: |
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.
I don't know how to deal with ...configuration-block.. do you have any clue ?
Hey Thomas! Thanks for the excellent PR and updates. Since this is not a new feature to Symfony 2.1, I've patched this into the 2.0 branch. I've also made a few small tweaks at sha: 1c98e4c Thanks! |
Let me knonw for any change that I have to make.
Also,
The PHP Service declaration is missing, I don't know this syntax.
Regards