Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,16 @@ delete existing ones::
$entry = $result[0];
$entry->setAttribute('email', array('[email protected]'));
$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.
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added it.


.. _Packagist: https://packagist.org/packages/symfony/ldap