Copyright © 2009-2020 Marc Worrell, Arjan Scherpenisse
Authors: Marc Worrell (marc@worrell.nl).
delete/2 | Delete a resource. |
delete/3 | |
delete_nocheck/2 | Delete a resource, no check on rights etc is made. |
duplicate/3 | Duplicate a resource, creating a new resource with the given title. |
flush/2 | |
insert/2 | Insert a new resource. |
insert/3 | |
merge_delete/4 | Merge two resources, delete the losing resource. |
to_slug/1 | |
update/3 | Update a resource. |
update/4 | Update a resource. |
delete(Id::m_rsc:resource(), Context::z:context()) -> ok | {error, atom()}
Delete a resource
delete(Id::m_rsc:resource(), FollowUpId::m_rsc:resource(), Context::z:context()) -> ok | {error, atom()}
delete_nocheck(Id::m_rsc:resource(), Context::z:context()) -> ok | {error, atom()}
Delete a resource, no check on rights etc is made. This is called by m_category:delete/3
duplicate(Id::m_rsc:resource(), DupProps::m_rsc:props_all(), Context::z:context()) -> {ok, m_rsc:resource_id()} | {error, term()}
Duplicate a resource, creating a new resource with the given title.
flush(Id, Context) -> any()
insert(Props::m_rsc:props_all(), Context::z:context()) -> {ok, m_rsc:resource_id()} | {error, term()}
Insert a new resource. Crashes when insertion is not allowed.
insert(Props::m_rsc:props_all(), Options::list(), Context::z:context()) -> {ok, m_rsc:resource_id()} | {error, term()}
merge_delete(WinnerId::m_rsc:resource(), LoserId::m_rsc:resource(), Options::list(), Context::#context{}) -> ok | {error, term()}
Merge two resources, delete the losing resource.
to_slug(Trans) -> any()
update(Id::m_rsc:resource() | insert_rsc, Props::m_rsc:props_all() | m_rsc:update_function(), Context::z:context()) -> {ok, m_rsc:resource_id()} | {error, term()}
Update a resource
update(Id::m_rsc:resource() | insert_rsc, Props::m_rsc:props_all() | m_rsc:update_function(), Options::list() | boolean(), Context::z:context()) -> {ok, m_rsc:resource_id()} | {error, term()}
Update a resource. Options flags: is_escape_texts (default: true} is_acl_check (default: true) no_touch (default: false) is_import (default: false) Other options: tz - timezone for date conversions expected - list with property value pairs that are expected, fail if the properties are different.
{is_escape_texts, false} checks if the texts are escaped, and if not then it will escape. This prevents "double-escaping" of texts.Generated by EDoc