Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Documented how to add or remove values of multi-valued attributes#9553
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -129,8 +129,16 @@ delete existing ones:: | ||
| $entry = $result[0]; | ||
| $entry->setAttribute('email', array('fabpot@symfony.com')); | ||
| $entityManager->update($entry); | ||
| // Adding or removing values to a multi-valued attribute is more efficient than using update() | ||
| $entityManager->addAttributeValues($entry, 'telephoneNumber', array('+1.111.222.3333', '+1.222.333.4444')); | ||
| $entityManager->removeAttributeValues($entry, 'telephoneNumber', array('+1.111.222.3333', '+1.222.333.4444')); | ||
| // Removing an existing entry | ||
| $entityManager->remove(new Entry('cn=Test User,dc=symfony,dc=com')); | ||
| .. versionadded:: 4.1 | ||
| The ``addAttributeValues()`` and ``removeAttributeValues()`` methods | ||
| were introduced in Symfony 4.1. | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think we need a blank line after this paragraph to have it rendered correctly. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I've added it. | ||
| .. _Packagist: https://packagist.org/packages/symfony/ldap | ||