Open Source Content Management Framework

$object->listattachments

  1. Description

$object->listattachments -- List the file attachments of an object

Description

object $object->listattachments(void)

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 = new midgard_article(); // article with id 123 must exist.  
    $article->get_by_id(123);
    $list = $article->listattachments();  
    while($list->fetch()) 
    {  
        echo "name: " . $list->name . "
\n"; } ?>

This method is available to all Midgard types except MidgardParameter and MidgardAttachment.

Designed by Nemein, hosted by Anykey