\Hazaar\View\Widgets
DataSource
Summary
Methods Properties Constants
id
url
No properties No constants
Methods
addrow()
addrow($code) : \\Hazaar\\Widgets\\DataSource

This event is triggered when a new row is added to the data source records. This allows the new row to be sent to the server to be stored permanently.

Arguments: rowid, rowdata, position, commit

Tags

Since

1.1

Parameters

$codestring

The code to execute when the event is triggered.

Returns

\\Hazaar\\Widgets\\DataSource
contenttype()
contenttype($type) : \\Hazaar\\Widgets\\DataSource

Use this option, If you want to explicitly pass in a content-type. Default is “application/x-www-form-urlencoded”.

Tags

Since

1.2

Parameters

$typestring

The content type for sending data to the server

Returns

\\Hazaar\\Widgets\\DataSource
data()
data($value) : \\Hazaar\\Widgets\\DataSource

Data to be sent to the server

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource
datafield()
datafield($name, $type = null, $map = null) : \\Hazaar\\Widgets\\DataSource

Add a single data field

Tags

Since

1.1

Parameters

$name

No description

$type

No description

$map

No description

Returns

\\Hazaar\\Widgets\\DataSource
datafields()
datafields($value) : \\Hazaar\\Widgets\\DataSource

An array describing the fields in a particular record. Each datafield must define the following members:

  • name – A string containing the data field’s name.
  • type(optional) – A string containing the data field’s type. Possible values: ‘string’, ‘date’, ‘number’, ‘bool’
  • map(optional) – A mapping to the data field.

Tags

Since

1.1

Parameters

$valuearray

The value to set

Returns

\\Hazaar\\Widgets\\DataSource
datatype()
datatype($value) : \\Hazaar\\Widgets\\DataSource
/**

the data’s type. Possible values: ‘xml’, ‘json’, ‘jsonp’, ‘tsv’, ‘csv’, ‘local’, ‘array’.

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource
deleterow()
deleterow($code) : \\Hazaar\\Widgets\\DataSource

This event is triggered when a row is deleted from the data source records. This allows code to execute that can signal the server to permanently remove the row from stored data.

Arguments: rowid, commit

Tags

Since

1.1

Parameters

$codestring

The code to execute when the event is triggered.

Returns

\\Hazaar\\Widgets\\DataSource
event()
event($name, $code, $argdef = Array ( ) )

Parameters

$name

No description

$code

No description

$argdef

No description

filter()
filter($code) : \\Hazaar\\Widgets\\DataSource

Callback function called when a filter is applied or removed.

Tags

Since

1.1

Parameters

$codemixed

The code to execute when the page size is changed.

Returns

\\Hazaar\\Widgets\\DataSource
formatdata()
formatdata($code) : \\Hazaar\\Widgets\\DataSource

Before the data is sent to the server, you can fully override it by using the ‘formatdata’ function of the source object. The result that the ‘formatdata’ function returns is actually what will be sent to the server.

Arguments: data.

Tags

Since

1.2

Parameters

$codemixed

The code to execute

Returns

\\Hazaar\\Widgets\\DataSource
id()
id($value) : \\Hazaar\\Widgets\\DataSource

A string containing the Id data field.

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource
localdata()
localdata($data) : \\Hazaar\\Widgets\\DataSource

An array of data to use as a local data source. If this is set, then nothing else is required.

Tags

Since

1.1

Parameters

$data

No description

Returns

\\Hazaar\\Widgets\\DataSource
pagenum()
pagenum($page) : \\Hazaar\\Widgets\\DataSource

Determines the initial page number when paging is enabled.

Tags

Since

1.2

Parameters

$pageint

The initial page number

Returns

\\Hazaar\\Widgets\\DataSource
pager()
pager($code) : \\Hazaar\\Widgets\\DataSource

Callback function called when the current page or page size is changed.

Tags

Since

1.2

Parameters

$codemixed

The code to execute when the page size is changed.

Returns

\\Hazaar\\Widgets\\DataSource
pagesize()
pagesize($size) : \\Hazaar\\Widgets\\DataSource

Determines the page size when paging is enabled.

Tags

Since

1.2

Parameters

$size

No description

Returns

\\Hazaar\\Widgets\\DataSource
processdata()
processdata($code) : \\Hazaar\\Widgets\\DataSource

Extend the default data object sent to the server.

Arguments: data.

Tags

Since

1.2

Parameters

$codemixed

The code to execute

Returns

\\Hazaar\\Widgets\\DataSource
record()
record($value) : \\Hazaar\\Widgets\\DataSource

A string describing the information for a particular record.

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource
root()
root($value) : \\Hazaar\\Widgets\\DataSource

A string describing where the data begins and all other loops begin from this element

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource
sort()
sort($code) : \\Hazaar\\Widgets\\DataSource

Callback function called when the sort column or sort order is changed.

Tags

Since

1.2

Parameters

$codemixed

The code to execute when the page size is changed.

Returns

\\Hazaar\\Widgets\\DataSource
sortcolumn()
sortcolumn($field) : \\Hazaar\\Widgets\\DataSource

Determines the initial sort column. The expected value is a data field name.

Tags

Since

1.2

Parameters

$fieldstring

The data field name to sort on.

Returns

\\Hazaar\\Widgets\\DataSource
sortdirection()
sortdirection($dir) : \\Hazaar\\Widgets\\DataSource

Determines the sort order. The expected value is ‘asc’ for (A to Z) sorting or ‘desc’ for (Z to A) sorting.

Tags

Since

1.2

Parameters

$dirstring

The sort direction. Valid arguments are ‘asc’ and ‘desc’.

Returns

\\Hazaar\\Widgets\\DataSource
type()
type($value) : \\Hazaar\\Widgets\\DataSource

The type of request to make (“POST” or “GET”), default is “GET

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource
updaterow()
updaterow($code) : \\Hazaar\\Widgets\\DataSource

This event is triggered when a row is updated in the data source records. This allows the updated row to be sent to the server to be stored permenantly.

Arguments: rowid, rowdata, commit

Tags

Since

1.1

Parameters

$codestring

The code to execute when the event is triggered.

Returns

\\Hazaar\\Widgets\\DataSource
url()
url($value) : \\Hazaar\\Widgets\\DataSource

A string containing the URL to which the request is sent.

Tags

Since

1.1

Parameters

$value

No description

Returns

\\Hazaar\\Widgets\\DataSource