modules/KBDocuments/KBListViewData.php

Show: inherited
Table of Contents

\KBListViewData

Package:

Data set for ListView

Parent(s)
\ListViewData

Properties

Propertypublic  $additionalDetails= 'true'
inheritedInherited from: \ListViewData::$$additionalDetails
Default valuetrueDetails
Type
n/a
Inherited_from
\ListViewData::$$additionalDetails  
Propertypublic  $additionalDetailsAjax= 'true'
inheritedInherited from: \ListViewData::$$additionalDetailsAjax
Default valuetrueDetails
Type
n/a
Inherited_from
\ListViewData::$$additionalDetailsAjax  
Propertypublic  $additionalDetailsAllow= 'null'
inheritedInherited from: \ListViewData::$$additionalDetailsAllow
Default valuenullDetails
Type
n/a
Inherited_from
\ListViewData::$$additionalDetailsAllow  
Propertypublic  $additionalDetailsFieldToAdd= ''NAME''
Default value'NAME'Details
Type
n/a
Inherited_from
\ListViewData::$$additionalDetailsFieldToAdd  
Propertypublic  $base_url= 'null'
inheritedInherited from: \ListViewData::$$base_url
Default valuenullDetails
Type
n/a
Inherited_from
\ListViewData::$$base_url  
Propertypublic  $count_query= ''''
inheritedInherited from: \ListViewData::$$count_query
Default value''Details
Type
n/a
Inherited_from
\ListViewData::$$count_query  
Propertypublic  $listviewName= 'null'
inheritedInherited from: \ListViewData::$$listviewName
Default valuenullDetails
Type
n/a
Inherited_from
\ListViewData::$$listviewName  

Methods

methodpublicKBListViewData( ) : void

methodpublicListViewData( ) : \ListViewData
inherited

Constructor sets the limitName to look up the limit in $sugar_config

Inherited from: \ListViewData::ListViewData()
Returns
Type Description
\ListViewData
methodpublicgenerateURLS( int $sortOrder, int $offset, int $prevOffset, int $nextOffset, int $endOffset, int $totalCounted ) : array
inherited

generates urls for use by the display layer

Inherited from: \ListViewData::generateURLS()
Parameters
Name Type Description
$sortOrder int
$offset int
$prevOffset int
$nextOffset int
$endOffset int
$totalCounted int
Returns
Type Description
array of urls orderBy and baseURL are always returned the others are only returned according to values passed in.
methodpublicgetAdditionalDetails( \unknown_type $fields, \unknown_type $adFunction, \unknown_type $editAccess ) : array
inherited

generates the additional details values

Inherited from: \ListViewData::getAdditionalDetails()
Parameters
Name Type Description
$fields \unknown_type
$adFunction \unknown_type
$editAccess \unknown_type
Returns
Type Description
array string to attach to field
methodpublicgetAdditionalDetailsAjax( \GUID $id ) : array
inherited

generates the additional details span to be retrieved via ajax

Inherited from: \ListViewData::getAdditionalDetailsAjax()
Parameters
Name Type Description
$id \GUID

id id of the record

Returns
Type Description
array string to attach to field
methodpublicgetBaseURL( ) : STRING
inherited

generates the base url without any files in the block variables will not be part of the url

Inherited from: \ListViewData::getBaseURL()
Returns
Type Description
STRING (the base url)
methodpublicgetLimit( ) : INT
inherited

gets the limit of how many rows to show per page

Inherited from: \ListViewData::getLimit()
Returns
Type Description
INT (the limit)
methodpublicgetListViewData( \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'=>
inherited

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

Parameters
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
Returns
Type Description
\array('data'=> row data, 'pageData' => page data information, 'query' => original query string)
methodpublicgetOffset( ) : INT
inherited

returns the current offset

Inherited from: \ListViewData::getOffset()
Returns
Type Description
INT (current offset)
methodpublicgetOrderBy(  $orderBy = '',  $direction = '' ) : array
inherited

checks the request for the order by and if that is not set then it checks the session for it

Inherited from: \ListViewData::getOrderBy()
Parameters
Name Type Description
$orderBy
$direction
Returns
Type Description
array containing the keys orderBy => field being ordered off of and sortOrder => the sort order of that field
methodpublicgetReverseSortOrder( STRING $current_order ) : STRING
inherited

gets the reverse of the sort order for use on links to reverse a sort order from what is currently used

Inherited from: \ListViewData::getReverseSortOrder()
Parameters
Name Type Description
$current_order STRING

(ASC or DESC) $current_order

Returns
Type Description
STRING (ASC or DESC)
methodpublicgetTotalCount(  $main_query ) : void

Parameters
Name Type Description
$main_query
methodpublicsetVariableName( \unknown_type $baseName,  $where,  $listviewName = null ) : void
inherited

based 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()
Parameters
Name Type Description
$baseName \unknown_type
$where
$listviewName
Documentation was generated by DocBlox 0.18.1.