Constructor
new DirectoryEntry(entry, opts)
Creates a DirectoryEntry.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
entry |
object | The initial entry object. |
||||||
opts |
object | The configuration options. Properties
|
- Source:
Methods
get(propertyName) → {DirectoryEntry}
Gets an entry property.
Parameters:
Name | Type | Description |
---|---|---|
propertyName |
string | The property name, such as 'label', 'ordering', ... |
- Source:
Returns:
- Type
- DirectoryEntry
save(optsopt) → {Promise}
Saves the entry. It updates only the 'dirty properties' set through the DirectoryEntry#set method.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
object |
<optional> |
Options overriding the ones from this object. |
- Source:
Returns:
A promise object resolved with the updated entry.
- Type
- Promise
set(properties) → {DirectoryEntry}
Sets entry properties.
Parameters:
Name | Type | Description |
---|---|---|
properties |
object | The properties to set. |
- Source:
Returns:
- Type
- DirectoryEntry
Example
entry.set({
'label': 'new label',
'ordering': 50,
});