Class ModuleDates
- Modules
- ModuleDates
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
This class reads date recordsets from database
This class reads all available recordsets from table dates. and returns an Array with results, recordsets and validated parameters from $_GET Array.
Class: ModuleDates
Code:
array( [numResults] => 1 [limit] => 10 [totalCount] => 1 [recordset] => Array ( [0] => Array ( [0] => 10 [cat_id] => 10 [1] => 1 [cat_org_id] => 1 [2] => DAT [cat_type] => DAT [3] => COMMON [cat_name_intern] => COMMON [4] => Allgemein [cat_name] => Allgemein [5] => 0 [cat_hidden] => 0 [6] => 0 [cat_system] => 0 [7] => 0 [cat_default] => 0 [8] => 1 [cat_sequence] => 1 [9] => 1 [cat_usr_id_create] => 1 [10] => 2012-01-08 11:12:05 [cat_timestamp_create] => 2012-01-08 11:12:05 [11] => [cat_usr_id_change] => [12] => [cat_timestamp_change] => [13] => 9 [dat_id] => 9 [14] => 10 [dat_cat_id] => 10 [15] => [dat_rol_id] => [16] => [dat_room_id] => [17] => 0 [dat_global] => 0 [18] => 2013-09-21 21:00:00 [dat_begin] => 2013-09-21 21:00:00 [19] => 2013-09-21 22:00:00 [dat_end] => 2013-09-21 22:00:00 [20] => 0 [dat_all_day] => 0 [21] => 0 [dat_highlight] => 0 [22] => [dat_description] => [23] => [dat_location] => [24] => [dat_country] => [25] => eet [dat_headline] => eet [26] => 0 [dat_max_members] => 0 [27] => 1 [dat_usr_id_create] => 1 [28] => 2013-09-20 21:56:23 [dat_timestamp_create] => 2013-09-20 21:56:23 [29] => [dat_usr_id_change] => [30] => [dat_timestamp_change] => [31] => [member_date_role] => [32] => [mem_leader] => [33] => Paul Webmaster [create_name] => Paul Webmaster [34] => [change_name] => )
)
[parameter] => Array
(
[active_role] => 1
[calendar-selection] => 1
[cat_id] => 0
[category-selection] => 0,
[date] =>
[daterange] => Array
(
[english] => Array
(
[start_date] => 2013-09-21
[end_date] => 9999-12-31
)
[system] => Array
(
[start_date] => 21.09.2013
[end_date] => 31.12.9999
)
)
[headline] => Termine
[id] => 0
[mode] => actual
[order] => ASC
[startelement] => 0
[view_mode] => html
)
)
Endcode
Par: Returned Array
Located at moduledates.php
Methods summary
public
|
#
__construct( )
Constructor that will create an object of a parameter set needed in modules to get the recordsets. Initialize parameters |
private
string|false
|
#
formatDate( string $date )
Method validates all date inputs and formats them to date format 'Y-m-d' needed for database queries |
public
array
|
#
getDataSet( integer $startElement = 0, integer $limit = null )
SQL query returns an array with available dates. |
public
string
|
|
public
integer
|
|
public
string|false
|
#
getFormValue( string $date, string $reference )
Returns value for form field. This method compares a date value to a reference value and to date '1970-01-01'. Html output will be set regarding the parameters. If value matches the reference or date('1970-01-01'), the output value is cleared to get an empty string. This method can be used to fill a html form |
public
boolean
|
#
setDateRange( string $dateRangeStart = '', string $dateRangeEnd = '' )
Set a date range in which the dates should be searched. The method will fill 4 parameters @b dateStartFormatEnglish, @b dateStartFormatEnglish, |
private
string
|
#
setFormValue( string $date, string $reference )
Check date value to reference and set html output. If value matches to reference, value is cleared to get an empty string. |
public
string
|
|
private
string
|
Methods inherited from Modules
getDaterange()
,
getId()
,
getMode()
,
getOrder()
,
getParameter()
,
getParameters()
,
getStartElement()
,
setId()
,
setMode()
,
setOrder()
,
setParameter()
,
setStartElement()
Constants summary
Properties summary
Properties inherited from Modules
$activeRole
,
$arrParameter
,
$catId
,
$daterange
,
$headline
,
$id
,
$mode
,
$order
,
$parameters
,
$properties
,
$start
,
$validModes