Function Reference Usage Guide

The Midgard 1.4 (Bifrost) Reference is organized around the design of the database storage backend. For every entity, like a topic or an article, a record type exists. The record type definition of an entity is a direct reflection of the database table that holds instances, records, of those entities. The records are not manipulated directly, but through functions that work with objects. The parameters of those objects often map directly to the fields of the record type they relate to. Sometimes relevant information from different record types is merged into one object.

For every entity this reference holds a section with a Record Type Definition, an Object Definition and an explanation of the available functions that are related to that particular record type. A separate section is dedicated to functions that do not relate to a specific record type.

To allow for quick lookups the functions are documented following a strict order.


  mgd_function_title

  Name

  mgd_function_title - short description

  Description

  return type mgd_function_title(type parameter, type parameter, [type parameter]);

  Minimum version: some midgard version

  Short explanation.

  Returns [something] if successful. Returns [something else] on failure.

  <?
    // Optional: a coding example.
  ?>
    

If the return type of a function is object, the available parameters and methods from that object can be found by examining the related Object Definition.

Table 1. Midgard Functions

 
 
a
r
t
i
c
l
e
 
a
t
t
a
c
h
m
e
n
t
 
e
l
e
m
e
n
t
 
e
v
e
n
t
 
e
v
e
n
t
_
m
e
m
b
e
r
 
g
r
o
u
p
 
h
o
s
t
 
m
e
m
b
e
r
 
p
a
g
e
 
p
a
g
e
_
e
l
e
m
e
n
t
 
p
a
g
e
l
i
n
k
 
p
e
r
s
o
n
 
p
r
e
f
e
r
e
n
c
e
 
s
i
t
e
g
r
o
u
p
 
s
n
i
p
p
e
t
 
s
n
i
p
p
e
t
d
i
r
 
s
t
y
l
e
 
t
o
p
i
c
mgd_create_____X XXXXXXXXXXXXXXXX
mgd_update_____XXXXXXXXXXXXXXXXXX
mgd_delete_____XXXXXXXXXXXXXXXXXX
mgd_delete______tree        X      XXX
mgd_move_____X XX    XX       X
mgd_copy_____X XX    XX X   XXX
mgd_get_____XXXXXXXXXXXXXXXXXX
mgd_get______by_nameX X  XX XXX   X XX
mgd_list______s  XXXXXXXXXXXXXXXX
mgd_is_in______tree        X        X
mgd_walk______tree        X       XX
mgd_is______ownerX  X XX X      X X
mgd_stat_attachment