$object->listattachments

(unknown)

$object->listattachments -- List the attachments to a record

Description

object $object->listattachments (void)

Minimum version: Midgard 1.4 (Bifrost)

Returns the list of attachments, traversable by calling fetch() on the returned object.

Returns an object traversable by calling fetch() if successful. Returns FALSE on failure.


<?php
  $article = mgd_get_article(123); // article with id 123 must exist.
  $list    = $article->listattachments();
  while($list->fetch()) {
    echo "name: " . $list->name . "<br>\n";
  }
?>

Method available for: article, element, event, event_member, group, host, member, page, pageelement, pagelink, person, preference, sitegroup, snippet, snippetdir, style and topic objects.