phpDocumentor jqScheduler
[ class tree: jqScheduler ] [ index: jqScheduler ] [ all elements ]

Class: jqScheduler

Source Location: /jqScheduler.php

Class jqScheduler

Class Overview

Located in /jqScheduler.php [line 31]



		
				Author(s):
		
  • Tony Tomov, (tony@trirand.com)
API Tags:
Abstract:  

A PHP class to work with jqScheduler plugin. This class do evrething when the jqSchedule is builded

Example of use


Information Tags:
Version:  4.1.1.0
Copyright:  TriRand Ltd

Properties

Methods

[ Top ]
Property Summary
array   $available_users   Holds the available calendars
string   $backend_type   The default backend type.
string   $calenderid   The id of the calendar in the template
string   $datepickerid   The id of the calender in the template
mixed   $encoding  
The   $eventid  
string   $I   Used to perform case insensitive search in PostgreSQL. The variable is
mixed   $localenpath  
array   $options   deafult options in the calender. @see setOption method
type   $PDF   Holds th PDF exporting options
string   $printformat   The default print format. Can be html or pdf
the   $table  
mixed   $templatepath  
string   $version   Holds the versionnumber

[ Top ]
Method Summary
jqScheduler   __construct()   Main constructor
string   arr2css()   Convert array to css string
string   arr2htmloption()   Convert array to html option string. When $selected is set the element becom a atribute selected
array   composeSearch()   Composes a data either from a simple or advanced search.
array.   convertDateFormat()   Converts a PHP date format to datepicker and fullcalender date format
void   exportEvents()   Export the calendar. The method is used in renderer
type   getOption()   Retun the option the calendar
array   getStringForGroup()   Recursivley build the sql query from a json object
void   printEvents()   Print the result either as html or as pdf depending on the printformat variable
string   render()   Main method where all things are happend
bolean   setEvent()   Set a valid calenndar event
void   setLocale()   Set the language used in the calender.
jqChart   setOption()   Options regarding the calender.
void   setPdfOptions()   Set options for PDF export.
void   setTemplate()   Set the template and css files used for the editing the events
void   setUrl()   Set the url from where to get the data
void   setUser()   Set the current user used in event calendar.
void   setUserDateFormat()   Set the user date format used use a php convensions
void   setUserNames()   Set the names of the currently used calendar (users)
array   _buildSearch()   Builds the search where clause when the user perform a search Return arrray the first element is a strinng with the where clause, the second element is array containing the value parameters passed to the sql.
void   _Response()  

[ Top ]
Properties
array   $available_users = array() [line 148]

Holds the available calendars

API Tags:
Access:  public


[ Top ]
string   $backend_type = 'database' [line 157]

The default backend type.

Can be database, demo, gcal(google calendar), calDAV. Currently only database

API Tags:
Access:  public


[ Top ]
string   $calenderid = "calendar" [line 129]

The id of the calendar in the template

API Tags:
Access:  public


[ Top ]
string   $datepickerid = "datepicker" [line 135]

The id of the calender in the template

API Tags:
Access:  public


[ Top ]
mixed   $encoding = 'utf-8' [line 165]
API Tags:
Access:  public


[ Top ]
The   $eventid = "event" [line 141]
API Tags:
Access:  public


[ Top ]
string   $I = '' [line 227]

Used to perform case insensitive search in PostgreSQL. The variable is

detected automatically depending on the griver from jqGrid{driver}.php

API Tags:
Access:  protected


[ Top ]
mixed   $localenpath = "localization" [line 74]
API Tags:
Access:  public


[ Top ]
array   $options = array(
"editable"=>true,
"defaultView"=> 'agendaWeek',
"slotMinutes"=>30,
"selectable"=>true,
"theme"=>true, // alwais ThemeRoller
"header"=>array(
"left"=>'prev,next today',
"center"=> 'title',
"right"=> 'agendaDay,agendaWeek,month'
))
[line 42]

deafult options in the calender. @see setOption method

API Tags:
Access:  protected


[ Top ]
type   $PDF = array(
"page_orientation" => "P",
"unit"=>"mm",
"page_format"=>"A4",
"creator"=>"jqScheduler",
"author"=>"jqScheduler",
"title"=>"jqScheduler PDF",
"subject"=>"Subject",
"keywords"=>"Calendar",
"margin_left"=>15,
"margin_top"=>7,
"margin_right"=>15,
"margin_bottom"=>25,
"margin_header"=>5,
"margin_footer"=>10,
"font_name_main"=>"freeserif",
"font_size_main"=>10,
"header_logo"=>"",
"header_logo_width"=>0,
"header_title"=>"",
"header_string"=>"",
"header"=>false,
"footer"=>true,
"font_monospaced"=>"courier",
"font_name_data"=>"freeserif",
"font_size_data"=>8,
"margin_footer"=>10,
"image_scale_ratio"=>1.25,
"path_to_pdf_class"=>"tcpdf/tcpdf.php",
"filename"=>"calendar.pdf"
)
[line 191]

Holds th PDF exporting options

API Tags:
See:  jqScheduler::setPdfOptions()
Access:  protected


[ Top ]
string   $printformat = 'pdf' [line 164]

The default print format. Can be html or pdf

API Tags:
Access:  public


[ Top ]
the   $table = "events" [line 123]
API Tags:
Access:  public


[ Top ]
mixed   $templatepath = "templates" [line 75]
API Tags:
Access:  public


[ Top ]
string   $version = '4.1.1.0' [line 36]

Holds the versionnumber

API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 232]

  jqScheduler __construct( [type $conn = null]  )

Main constructor

Parameters:
type   $conn: 


[ Top ]
arr2css  [line 317]

  string arr2css( array $arr  )

Convert array to css string

Parameters:
array   $arr: 

API Tags:
Access:  public


[ Top ]
arr2htmloption  [line 298]

  string arr2htmloption( array $arr, [string $selected = '']  )

Convert array to html option string. When $selected is set the element becom a atribute selected

Parameters:
array   $arr:  associative array containing data. the key is the values in the select
string   $selected:  a

API Tags:
Access:  public


[ Top ]
composeSearch  [line 858]

  array composeSearch( [string $stype = 'simple']  )

Composes a data either from a simple or advanced search.

Parameters:
string   $stype:  the type of search. Can be simple or complex

API Tags:
Return:  which wirast element is the string used in prepare statement. The second parameter are the values for the prepared statement.
Access:  protected


[ Top ]
convertDateFormat  [line 458]

  array. convertDateFormat( type $phpformat  )

Converts a PHP date format to datepicker and fullcalender date format

Parameters:
type   $phpformat: 

API Tags:
Return:  The first element is the fulcalendar format, the second is the datepicker
Access:  public


[ Top ]
exportEvents  [line 574]

  void exportEvents( )

Export the calendar. The method is used in renderer


API Tags:
Access:  public


[ Top ]
getOption  [line 336]

  type getOption( string $option  )

Retun the option the calendar

Parameters:
string   $option: 

API Tags:
Access:  public


[ Top ]
getStringForGroup  [line 730]

  array getStringForGroup( object $group, array $prm  )

Recursivley build the sql query from a json object

Parameters:
object   $group:  the object to parse
array   $prm:  parameters array

API Tags:
Return:  - first element is the where clause secon is the array of values to pass
Access:  protected


[ Top ]
printEvents  [line 673]

  void printEvents( )

Print the result either as html or as pdf depending on the printformat variable


API Tags:
See:  jqScheduler::$printformat
Access:  public


[ Top ]
render  [line 892]

  string render( [boolean $script = true], [boolean $echo = true]  )

Main method where all things are happend

Parameters:
boolean   $script:  if true a javascript tag is outputed
boolean   $echo:  if false a the builded string is returned

API Tags:
Access:  public


[ Top ]
setEvent  [line 376]

  bolean setEvent( string $event, string $code  )

Set a valid calenndar event

Parameters:
string   $event:  - valid calendar event
string   $code:  Javascript code which will be executed when the event raises

API Tags:
Access:  public


[ Top ]
setLocale  [line 266]

  void setLocale( string $lng  )

Set the language used in the calender.

Should be a 5 leter code - the first is the language, the second is the country.

Parameters:
string   $lng: 

API Tags:
Access:  public


[ Top ]
setOption  [line 352]

  jqChart setOption( mixed $option, [ $value = null], mixed $mixvalue  )

Options regarding the calender.

Parameters:
mixed   $option:  the option name for the calender. Can be a string or array. When used as array a key value pair should be defined, where the key is the name
mixed   $mixvalue:  is the value option in case the $option is string
   $value: 

API Tags:
Return:  instance
Access:  public


[ Top ]
setPdfOptions  [line 445]

  void setPdfOptions( array $apdf  )

Set options for PDF export.

Parameters:
array   $apdf: 

API Tags:
Access:  public


[ Top ]
setTemplate  [line 279]

  void setTemplate( string $html, [string $css = '']  )

Set the template and css files used for the editing the events

Parameters:
string   $html: 
string   $css: 

API Tags:
Access:  public


[ Top ]
setUrl  [line 254]

  void setUrl( string $curl  )

Set the url from where to get the data

Parameters:
string   $curl: 

API Tags:
Access:  public


[ Top ]
setUser  [line 395]

  void setUser( integer $user_id, [boolean $usesession = true]  )

Set the current user used in event calendar.

The function uses sessions to store the current user. This is done if the second parameter is set to true. Be a carefull when use this type of storing the user.

Parameters:
integer   $user_id:  the user
boolean   $usesession:  is set to true a session is used, otherwiese a custom mechanism should be used

API Tags:
Access:  public


[ Top ]
setUserDateFormat  [line 435]

  void setUserDateFormat( string $newformat  )

Set the user date format used use a php convensions

Parameters:
string   $newformat: 

API Tags:
Access:  public


[ Top ]
setUserNames  [line 423]

  void setUserNames( type $anames  )

Set the names of the currently used calendar (users)

Parameters:
type   $anames: 

API Tags:
Access:  public


[ Top ]
_buildSearch  [line 823]

  array _buildSearch( [ $prm = null], [ $str_filter = '']  )

Builds the search where clause when the user perform a search Return arrray the first element is a strinng with the where clause, the second element is array containing the value parameters passed to the sql.

Parameters:
array   $prm:  - parameters passed to the sql
   $str_filter: 

API Tags:
Access:  protected


[ Top ]
_Response  [line 876]

  void _Response( $response  )

Parameters:
   $response: 

API Tags:
Access:  protected


[ Top ]

Documentation generated on Wed, 22 Jun 2011 14:57:50 +0300 by phpDocumentor 1.4.3