Skip to content
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

Allow to get taxons from specific taxonomy #1718

Merged
merged 1 commit into from
Jul 15, 2014

Conversation

pjedrzejewski
Copy link
Member

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Fixed tickets -
License MIT
Doc PR -

Introduce TaxonsAwareInterface and allow to get taxons from specific taxonomy.

pjedrzejewski pushed a commit that referenced this pull request Jul 15, 2014
Allow to get taxons from specific taxonomy
@pjedrzejewski pjedrzejewski merged commit fc501f5 into Sylius:master Jul 15, 2014
@pjedrzejewski pjedrzejewski deleted the get-specific-taxons branch July 15, 2014 16:33
interface TaxonsAwareInterface
{
/**
* Get all taxons.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong, it can return one taxon, also better would be to add new method instead of hack around in old one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure? It seems like its just copied from src/Sylius/Component/Core/Model/ProductInterface.php

Copy link
Contributor

Choose a reason for hiding this comment

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

@sstok Look at diff, old version don't have parameter, new one uses it to hack around and return specific taxon which is wrong IMO, cause it should be in new method.

@patrick-mcdougle
Copy link
Contributor

If the method took in a Taxonomy object, you could save some database calls by using the taxonomy->getId() instead of getName().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants