Add assetic DIC tags reference. #2480

Merged
merged 1 commit into from May 3, 2013

Conversation

Projects
None yet
4 participants
@pvolok
Contributor

pvolok commented Apr 7, 2013

Q A
Doc fix? no
New docs? yes
Applies to 2.0+
Fixed tickets #2347

The one known issue is that the assetic.asset tag adds the asset to the asset manager, but AsseticBundle throws an exception when any asset has no associated formula. So at the moment this tag seems to be useless. I created an issue(symfony/AsseticBundle#183) in AsseticBundle. Once its filxed, I will add an example.

@wouterj

View changes

reference/dic_tags.rst
+ {
+ public function process(AssetInterface $asset)
+ {
+ // Change $asset or return a new one

This comment has been minimized.

Show comment Hide comment
@wouterj

wouterj Apr 7, 2013

Member

// ... change $asset or return a new one

@wouterj

wouterj Apr 7, 2013

Member

// ... change $asset or return a new one

+ }
+
+ public function filterDump(AssetInterface $asset)
+ {

This comment has been minimized.

Show comment Hide comment
@wouterj

wouterj Apr 7, 2013

Member

do you really mean an empty function, or do you mean // ...?

@wouterj

wouterj Apr 7, 2013

Member

do you really mean an empty function, or do you mean // ...?

This comment has been minimized.

Show comment Hide comment
@pvolok

pvolok Apr 7, 2013

Contributor

Usually filters do their job in one of these methods, while the second one is empty. Should I still add // ... into the second?

@pvolok

pvolok Apr 7, 2013

Contributor

Usually filters do their job in one of these methods, while the second one is empty. Should I still add // ... into the second?

@wouterj

View changes

reference/dic_tags.rst
+
+Finally, apply the filter:
+
+.. code-block:: twig

This comment has been minimized.

Show comment Hide comment
@wouterj

wouterj Apr 7, 2013

Member

twig is not supported, use jinja (a python templating engine which looks like twig).

@wouterj

wouterj Apr 7, 2013

Member

twig is not supported, use jinja (a python templating engine which looks like twig).

@stof

View changes

reference/dic_tags.rst
+**Purpose**: Add a factory worker
+
+Factory worker is a class implementing
+:class:`Assetic\\Factory\\Worker\\WorkerInterface`. Its ``process($asset)``

This comment has been minimized.

Show comment Hide comment
@stof

stof Apr 7, 2013

Member

:class: can only be used for Symfony classes, not for vendor classes

@stof

stof Apr 7, 2013

Member

:class: can only be used for Symfony classes, not for vendor classes

@pvolok

This comment has been minimized.

Show comment Hide comment
@pvolok

pvolok May 1, 2013

Contributor

I think it's ready to be merged. And I'll add more description for assetic.asset once symfony/AsseticBundle#183 is resolved.

Contributor

pvolok commented May 1, 2013

I think it's ready to be merged. And I'll add more description for assetic.asset once symfony/AsseticBundle#183 is resolved.

weaverryan added a commit that referenced this pull request May 3, 2013

Merge pull request #2480 from pvolok/assetic_tags
Add assetic DIC tags reference.

@weaverryan weaverryan merged commit 6690584 into symfony:2.0 May 3, 2013

weaverryan added a commit that referenced this pull request May 3, 2013

@weaverryan

This comment has been minimized.

Show comment Hide comment
@weaverryan

weaverryan May 3, 2013

Member

Hi Pavel!

Nice work with this - it's very nice! If you get more details about assetic.asset, just make another PR. I think it's probably better to have some documentation on these tags rather than nothing: we can improve things from here.

Thanks!

Member

weaverryan commented May 3, 2013

Hi Pavel!

Nice work with this - it's very nice! If you get more details about assetic.asset, just make another PR. I think it's probably better to have some documentation on these tags rather than nothing: we can improve things from here.

Thanks!

@pvolok pvolok deleted the pvolok:assetic_tags branch May 3, 2013

weaverryan added a commit that referenced this pull request May 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment