[Midas] revisions of an item

Zach Mullen zach.mullen at kitware.com
Wed Sep 5 14:11:22 EDT 2012


The full set of revisions can be retrieved using the item dao:

$revs = $itemDao->getRevisions();

They should be in order from oldest to newest, I think, but you might want
to verify that :)

Thanks,

Zach

On Wed, Sep 5, 2012 at 2:08 PM, Mona Wong <mona at sdsc.edu> wrote:

>
> Another question about retrieving information about an item from my
> controller...
>
> // Load our models
> $ItemModel = MidasLoader::loadModel('Item');
> $ItemRevisionModel = MidasLoader::loadModel('ItemRevision');
> $BitstreamModel = MidasLoader::loadModel('Bitstream');
>
> // Get the item and its last revision from the time id
> $itemDao = $ItemModel->load($itemId);
> $lastRevisionDao = $ItemModel->getLastRevision($itemDao);
>
>
> The last line above gives me the last revision of an item.  How do I get
> all the revisions?  And what order will the revisions be in...first to last
> (most recent)?
>
> thanks,
> Mona
>
>  *********************************************
>     Mona Wong
>     Web & iPad Application Developer
>     San Diego Supercomputer Center
>
>     You are the light you wish to see.
> *********************************************
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120905/9f1b5371/attachment.html>


More information about the Midas mailing list