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 choose fields that doesn't exist #105

Conversation

spolischook
Copy link
Contributor

No description provided.

@dunglas
Copy link
Contributor

dunglas commented Dec 28, 2013

@spolischook What's the use case? It's a new feature in SonataAdmin I've missed?

@spolischook
Copy link
Contributor Author

Yes, we have a new feature in Sonata - it is a MongoDb! :) So, sometimes we need choose all entries that don't have some field.

@dunglas
Copy link
Contributor

dunglas commented Dec 28, 2013

OK, nice addition :). @rande Can this feature be factorized with other bundles such as PHPCR?

@spolischook Can you write a doc, add tests covering this case and replace raw strings by class constants (e.g. 'notExistentField') please?

$this->active = true;
} else {
if ($data['value'] === '' || $data['value'] === null || $data['value'] === false || $data['value'] === 'all') {
return;
}

if ($data['type'] == ChoiceType::TYPE_NOT_CONTAINS) {
if ('notExistentField' == $data['value']) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use === instead of == everywhere please (type are not checked everywhere in the existing code base but this will be fixed).

@dunglas
Copy link
Contributor

dunglas commented Dec 28, 2013

And what if someone want to search for the "notExistentField" value? It would be better to add a new key to the $data array (e.g. through a checkbox) than dealing with special values.

@dunglas
Copy link
Contributor

dunglas commented Sep 24, 2014

@spolischook any news about this PR?

@spolischook
Copy link
Contributor Author

@dunglas thanx for reminder. I'll try finish it in a next few days

@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@soullivaneuh
Copy link
Member

According to the new Sonata version management and next major release plan, this project has been refactored regarding branching and versioning.

If you see this message, your PR concerns a patch or a minor release and is not targeting the right branch.

So I'm closing this one, but don't see it as a refusal. If you think your work is still relevant and want to continue, feel free to reopen it on the right branch (e.g. the default one).

Regards.

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

Successfully merging this pull request may close these issues.

4 participants