Docuementation for ccm-cms-types-contact.ftt

git-svn-id: https://svn.libreccm.org/ccm/trunk@6298 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-11-03 12:13:41 +00:00
parent 965ae347b3
commit 3459f41585
1 changed files with 55 additions and 0 deletions

View File

@ -5,30 +5,85 @@
"ui": "http://www.arsdigita.com/ui/1.0"} "ui": "http://www.arsdigita.com/ui/1.0"}
> >
<#--filedoc
Functions for processing contact items.
-->
<#--doc
Gets the address associated with the provided contact item.
@param item The model of the contact item to use.
@return The model of the address item associated with the contact item.
-->
<#function getAddress item> <#function getAddress item>
<#return item["./address"]> <#return item["./address"]>
</#function> </#function>
<#--doc
Gets the person associated with the provided contact item.
@param item The model of the contact item to use.
@return The model of the person item associated with the contact item.
-->
<#function getPerson item> <#function getPerson item>
<#return item["./person"]> <#return item["./person"]>
</#function> </#function>
<#--doc
Gets the contact entries of the provided contact item.
@param item The model of the contact item to use.
@return A sequence of the models of the contact entries of the contact item.
-->
<#function getContactEntries item> <#function getContactEntries item>
<#return item["./contactentries"]> <#return item["./contactentries"]>
</#function> </#function>
<#--doc
Gets the specific contact entry by its `keyId`.
@param item The model of the contact item to use.
@param keyId The ID of the entry to retrieve.
@return The model of the contact entry with the provided ID.
-->
<#function getContactEntry item keyId> <#function getContactEntry item keyId>
<#return item["./contactentries[keyId='${keyId}']"]> <#return item["./contactentries[keyId='${keyId}']"]>
</#function> </#function>
<#--doc
Gets the label of a contact entry.
@param entry The model of the contact entry to use.
@return The label of the contact entry.
-->
<#function getContactEntryLabel entry> <#function getContactEntryLabel entry>
<#return entry["./key"]> <#return entry["./key"]>
</#function> </#function>
<#--doc
Gets the key of a contact entry.
@param entry The model of the contact entry to use.
@return The key of the contact entry.
-->
<#function getContactEntryKey entry> <#function getContactEntryKey entry>
<#return entry["./key"]> <#return entry["./key"]>
</#function> </#function>
<#--doc
Gets the value of a contact entry.
@param entry The model of the contact entry to use.
@return The value of the contact entry.
-->
<#function getContactEntryValue entry> <#function getContactEntryValue entry>
<#return entry["./value"]> <#return entry["./value"]>
</#function> </#function>