create()
Usage
create(type, key1, value1, key2, value2)
create(type, key, value)
create(type)
Structr.create(type, key1, value1, key2, value2);
Structr.create(type, {key1: value1, key2: value2});
Description
Creates a new node of the given Type with the given value(s) for the given key(s). This method can be used with multiple key-value pairs. The return value is the newly created entity. See also delete()
.
In a JavaScript environment, the function can be used just as in a StructrScript environment. Alternatively it can take a dictionary as the second parameter.
Example
${create('User', 'name', 'tester3')}
results in
ab6fcef53dd24793bfa67754f414c61e