Object: InvList

The InvList object is the standard object wrapper for all pginated lists database records. The InvList class is extended by other list types (such as InvDocument for example) to add the necessary database tables and field descriptions, and to optionally add new methods or properties where required. As such, the majority of dotAdmin table list interactions and accompanying template code will be implemented through a child of the InvList class.

Methods

addConditionalJoin($join)

Add a conditional join to your list query, eg: LEFT JOIN `user` ON (`user`.`user_id` = `document`.`owner_id`)

The will allow you to query your list object in more involved ways, filtering on text in tables joined to the primary by foreign keys.

addFileType($filetype)

Add another expected file type to the result set. This allows the list object to return an array of arrays of file objects, rather than just an array of objects

getAll($where , $params_array , $order)

Fetch unpaginated list of all matching results from the table, using paramaterised WHERE clause $where and ordered by the $order param.

getList($where , $params_array , $order , [$page_from])

Fetch page $page_from list of results from the table, using paramaterised WHERE clause $where and $params_array.

getObjects()

Return the result set form the last getList() call as a collection of File Objects.

If more than one FileType is expected in the result set, this method eturns an array of arrays of file objects

Default behavour:
[

  • $fileobject ,
  • $fileobject ,
  • $fileobject ,
  • ... etc ...

]

Multi Object Type behaviour:

[

  • {
    • 'filetype1' => $fileobject ,
    • 'filetype2' => $fileobject ,
    • 'filetype3' => $fileobject
  • } ,
  • {
    • 'filetype1' => $fileobject ,
    • 'filetype2' => $fileobject ,
    • 'filetype3' => $fileobject
  • } ,
  • {
    • 'filetype1' => $fileobject ,
    • 'filetype2' => $fileobject ,
    • 'filetype3' => $fileobject
  • } ,
  • ... etc ...

]

getPageList()

Return result of the last getList() call as a collection of arrays representing the results

getPagination()

Fetch an arry containing all of the variables required to provide pagination links on your result set.

Properties

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com