← Back to team overview

mahara-contributors team mailing list archive

[Bug 1866148] Re: add a function in class Collection to get the first view in the collection

 

** Changed in: mahara
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1866148

Title:
  add a function in class Collection to get the first view in the
  collection

Status in Mahara:
  Fix Released

Bug description:
  So far, every time we need the first view of a collection as a View
  object, we get the views from the collection, get the id of the first
  and then create the View object

  one idea:

  adjust the function views() from Collection class to fetch first view
  and update the places in mahara to use it, something like

  $view = $collection->views(0);

  or

  $view = $collection->views('first');

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1866148/+subscriptions


References