Skip to content
flack edited this page Dec 8, 2016 · 7 revisions

Midgard includes a metadata system which adds information like creation time, author, approval status and so on to every MgdSchema object and tracks them in dedicated DB columns. In PHP, metadata is available in the metadata property:

$article = new midcom_db_article($id);
$revisor = new midcom_db_person($article->metadata->revisor);
$revised = strftime('%x %X', $article->metadata->revised);
echo 'Article "' . $article->title . '" was last updated on ' . $revised . ' by ' . $revisor->name . "\n";

Links

Official documentation

Clone this wiki locally