File tree 1 file changed +8
-0
lines changed
Filter options
1 file changed +8
-0
lines changed
Original file line number Diff line number Diff line change @@ -129,8 +129,16 @@ delete existing ones::
129
129
$entry = $result[0];
130
130
$entry->setAttribute('email', array('fabpot@symfony.com'));
131
131
$entityManager->update($entry);
132
+
133
+ // Adding or removing values to a multi-valued attribute is more efficient than using update()
134
+ $entityManager->addAttributeValues($entry, 'telephoneNumber', array('+1.111.222.3333', '+1.222.333.4444'));
135
+ $entityManager->removeAttributeValues($entry, 'telephoneNumber', array('+1.111.222.3333', '+1.222.333.4444'));
132
136
133
137
// Removing an existing entry
134
138
$entityManager->remove(new Entry('cn=Test User,dc=symfony,dc=com'));
135
139
140
+ .. versionadded :: 4.1
141
+ The ``addAttributeValues() `` and ``removeAttributeValues() `` methods
142
+ were introduced in Symfony 4.1.
143
+
136
144
.. _Packagist : https://packagist.org/packages/symfony/ldap
You can’t perform that action at this time.
0 commit comments