modules/KBDocuments/KBListViewData.php
\KBListViewData
Data set for ListView
- Parent(s)
- \ListViewData
Properties

$additionalDetails= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \ListViewData::$$additionalDetails

$additionalDetailsAjax= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \ListViewData::$$additionalDetailsAjax

$additionalDetailsAllow= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \ListViewData::$$additionalDetailsAllow

$additionalDetailsFieldToAdd= ''NAME''
'NAME'Details- Type
- n/a
- Inherited_from
- \ListViewData::$$additionalDetailsFieldToAdd

$base_url= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \ListViewData::$$base_url

$count_query= ''''
''Details- Type
- n/a
- Inherited_from
- \ListViewData::$$count_query

$listviewName= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \ListViewData::$$listviewName
Methods

ListViewData(
)
:
\ListViewDataConstructor sets the limitName to look up the limit in $sugar_config
Inherited from: \ListViewData::ListViewData()| Type | Description |
|---|---|
| \ListViewData |

generateURLS(
int $sortOrder, int $offset, int $prevOffset, int $nextOffset, int $endOffset, int $totalCounted
)
:
array
| Name | Type | Description |
|---|---|---|
| $sortOrder | int | |
| $offset | int | |
| $prevOffset | int | |
| $nextOffset | int | |
| $endOffset | int | |
| $totalCounted | int |
| Type | Description |
|---|---|
| array | of urls orderBy and baseURL are always returned the others are only returned according to values passed in. |

getAdditionalDetails(
\unknown_type $fields, \unknown_type $adFunction, \unknown_type $editAccess
)
:
arraygenerates the additional details values
Inherited from: \ListViewData::getAdditionalDetails()| Name | Type | Description |
|---|---|---|
| $fields | \unknown_type | |
| $adFunction | \unknown_type | |
| $editAccess | \unknown_type |
| Type | Description |
|---|---|
| array | string to attach to field |

getAdditionalDetailsAjax(
\GUID $id
)
:
arraygenerates the additional details span to be retrieved via ajax
Inherited from: \ListViewData::getAdditionalDetailsAjax()| Name | Type | Description |
|---|---|---|
| $id | \GUID | id id of the record |
| Type | Description |
|---|---|
| array | string to attach to field |

getBaseURL(
)
:
STRINGgenerates the base url without any files in the block variables will not be part of the url
Inherited from: \ListViewData::getBaseURL()| Type | Description |
|---|---|
| STRING | (the base url) |

getListViewData(
\SugarBean $seed, string $where, \int:0 $offset
=
-1, \int:-1 $limit
=
-1, \string[]:array() $filter_fields
=
array(), \array:array() $params
=
array(), \string:'id' $id_field
=
'id', $singleSelect
=
true
)
:
\array('data'=>takes in a seed and creates the list view query based off of that seed if the $limit value is set to -1 then it will use the default limit and offset values
Inherited from: \ListViewData::getListViewData()it will return an array with two key values 1. 'data'=> this is an array of row data 2. 'pageData'=> this is an array containg three values a.'ordering'=> array('orderBy'=> the field being ordered by , 'sortOrder'=> 'ASC' or 'DESC') b.'urls'=>array('baseURL'=>url used to generate other urls , 'orderBy'=> the base url for order by //the following may not be set (so check empty to see if they are set) 'nextPage'=> the url for the next group of results, 'prevPage'=> the url for the prev group of results, 'startPage'=> the url for the start of the group, 'endPage'=> the url for the last set of results in the group c.'offsets'=>array( 'current'=>current offset 'next'=> next group offset 'prev'=> prev group offset 'end'=> the offset of the last group 'total'=> the total count (only accurate if totalCounted = true otherwise it is either the total count if less than the limit or the total count + 1 ) 'totalCounted'=> if a count query was used to get the total count
| Name | Type | Description |
|---|---|---|
| $seed | \SugarBean | |
| $where | string | |
| $offset | \int:0 | |
| $limit | \int:-1 | |
| $filter_fields | \string[]:array() | |
| $params | \array:array() | Potential $params are $params['distinct'] = use distinct key word $params['include_custom_fields'] = (on by default) $params['custom_XXXX'] = append custom statements to query |
| $id_field | \string:'id' | |
| $singleSelect |
| Type | Description |
|---|---|
| \array('data'=> | row data, 'pageData' => page data information, 'query' => original query string) |

getOrderBy(
$orderBy
=
'', $direction
=
''
)
:
arraychecks the request for the order by and if that is not set then it checks the session for it
Inherited from: \ListViewData::getOrderBy()| Name | Type | Description |
|---|---|---|
| $orderBy | ||
| $direction |
| Type | Description |
|---|---|
| array | containing the keys orderBy => field being ordered off of and sortOrder => the sort order of that field |

getReverseSortOrder(
STRING $current_order
)
:
STRINGgets the reverse of the sort order for use on links to reverse a sort order from what is currently used
Inherited from: \ListViewData::getReverseSortOrder()| Name | Type | Description |
|---|---|---|
| $current_order | STRING | (ASC or DESC) $current_order |
| Type | Description |
|---|---|
| STRING | (ASC or DESC) |

setVariableName(
\unknown_type $baseName, $where, $listviewName
=
null
)
:
voidbased off of a base name it sets base, offset, and order by variable names to retrieve them from requests and sessions
Inherited from: \ListViewData::setVariableName()| Name | Type | Description |
|---|---|---|
| $baseName | \unknown_type | |
| $where | ||
| $listviewName |