Class CalendarSolution_Detail_Form

Description

The means to edit a specific event via an HTML form

Located in /include/CalendarSolution/Detail/Form.php (line 20)

CalendarSolution
   |
   --CalendarSolution_Detail
      |
      --CalendarSolution_Detail_Form
Variable Summary
array $errors
array $fields
Method Summary
CalendarSolution_Detail_Form __construct ([string $dbms = CALENDAR_SOLUTION_DBMS])
void delete ()
string get_css_name ()
array get_date_starts ()
string get_rendering (int $calendar_id)
void insert ()
bool is_valid ([bool $check_calendar_id = true])
void update ()
Variables
array $errors = array() (line 25)

Errors found by is_valid()

  • access: protected
array $fields = array(
'calendar_id',
'calendar_uri',
'category_id',
'changed',
'date_start',
'detail',
'feature_on_page_id',
'frequency',
'frequent_event_id',
'frequent_event_uri',
'is_own_event',
'list_link_goes_to_id',
'location_start',
'note',
'span',
'status_id',
'summary',
'time_end',
'time_start',
'title',
'week_of_month',
)
(line 31)

The names of fields on the form

  • access: protected
array $fields_bitwise = array(
'feature_on_page_id',
)
(line 59)

The names of fields on the form that are bitwise in the database

  • access: protected

Inherited Variables

Inherited from CalendarSolution

CalendarSolution::$cache
CalendarSolution::$cache_available
CalendarSolution::$csrf_token_name
CalendarSolution::$data
CalendarSolution::$http_host
CalendarSolution::$sql
CalendarSolution::$uri
CalendarSolution::$use_cache
Methods
Constructor __construct (line 75)

Sets the CSRF token name and calls the main constructor

CalendarSolution_Detail_Form __construct ([string $dbms = CALENDAR_SOLUTION_DBMS])
  • string $dbms: optional override of the database extension setting in CALENDAR_SOLUTION_DBMS. Values can be "mysql", "mysqli", "pgsql", "sqlite", "sqlite3".

Redefinition of:
CalendarSolution::__construct()
Instantiates the database and cache classes then sets the $http_host property
delete (line 89)

Deletes the record specified by $this->data['calendar_id']

void delete ()
get_css_name (line 105)

Provides the path and name of the needed Cascading Style Sheet file

  • return: the path and name of the CSS file
  • access: public
string get_css_name ()
get_date_starts (line 117)

Calculates the start dates for events

Uses $this->data['date_start'], $this->data['frequency'], $this->data['week_of_month'] and $this->data['span']

  • return: an array of dates in YYYY-MM-DD format
  • access: protected
array get_date_starts ()
get_rendering (line 442)

Produces the HTML form for editing an event

  • return: the complete HTML of the desired event
  • throws: CalendarSolution_Exception if $this->data is not populated
  • access: public
string get_rendering (int $calendar_id)
  • int $calendar_id: the id number of the item to get (defaults to $_REQUEST['calendar_id'])
insert (line 198)

Inserts the posted data into the database

void insert ()
is_valid (line 256)

Ensures the validity of the information in $this->data

  • throws: CalendarSolution_Exception on fields containing predetermined data being manipulated
  • access: public
bool is_valid ([bool $check_calendar_id = true])
  • bool $check_calendar_id: test the value of calendar_id?
update (line 910)

Updates the record with the posted data

void update ()

Inherited Methods

Inherited From CalendarSolution_Detail

CalendarSolution_Detail::get_array_from_bitwise()
CalendarSolution_Detail::get_bitwise_from_array()
CalendarSolution_Detail::run_query()
CalendarSolution_Detail::set_data_from_query()

Inherited From CalendarSolution

CalendarSolution::__construct()
CalendarSolution::convert_windows_characters()
CalendarSolution::escape_data_for_html()
CalendarSolution::escape_for_icalendar()
CalendarSolution::flush_cache()
CalendarSolution::format_date()
CalendarSolution::get_admin_navigation()
CalendarSolution::get_credit()
CalendarSolution::get_css()
CalendarSolution::get_date_from_request()
CalendarSolution::get_errors()
CalendarSolution::get_event_formatted_icalendar()
CalendarSolution::get_int_array_from_request()
CalendarSolution::get_int_from_request()
CalendarSolution::get_string_from_request()
CalendarSolution::is_admin()
CalendarSolution::is_cache_available()
CalendarSolution::set_data_empty()
CalendarSolution::set_data_from_post()
CalendarSolution::set_uri()
CalendarSolution::validate_csrf_token()
Class Constants

Documentation generated on Wed, 21 Mar 2012 14:16:42 -0400 by phpDocumentor 1.4.4