$object->listparameters

(unknown)

$object->listparameters -- List the parameters/parameter domains for a record

Description

object $object->listparameters (string [domain])

Minimum version: Midgard 1.4 (Bifrost)

Returns the list of parameters or parameter domains for the record represented by the object, traversable by calling fetch() on the returned object. The domain parameter is optional.

When called without a domain, all parameter domains of the record represented by the object will be listed. The returned object will have a single field named 'domain' after each fetch.

When called with a domain, all parameters of the record represented by the object within the given parameter domain will be listed. The returned object will have the fields 'domain', 'name' and 'value' after each fetch.

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->listparameters();  // and have parameter domains, too.

  while($list->fetch()) {
    $list2 = $article->listparameters($list->domain);

    while($list2->fetch()) {
      echo "name: " . $list2->name . " value: " . $list2->value . "<br>\n";
    }

  }
?>

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