mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #57685
[Bug 1866148] [NEW] add a function in class Collection to get the first view in the collection
Public bug reported:
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');
** Affects: mahara
Importance: Undecided
Status: New
** Description changed:
- So far, everytime we need the first view of a collection as a View
+ 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');
** Changed in: mahara
Milestone: None => 20.04.0
--
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:
New
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
Follow ups