Class net_nemein_calendar_admin

Description

Calendar Admin interface class.

Located in /net/nemein/calendar/admin.php (line 17)

midcom_baseclasses_components_request
   |
   --midcom_baseclasses_components_request_admin
      |
      --net_nemein_calendar_admin
Variable Summary
 midcom_baseclasses_database_event $_event
 midcom_baseclasses_database_event $_root_event
 Array $_schemadb
Method Summary
 net_nemein_calendar_admin net_nemein_calendar_admin (mixed $topic, mixed $config)
 void _delete_record ()
 void _dm_create_callback (mixed &$datamanager)
 void _handler_create (mixed $handler_id, mixed $args, mixed &$data)
 void _handler_delete (mixed $handler_id, mixed $args, mixed &$data)
 void _handler_edit (mixed $handler_id, mixed $args, mixed &$data)
 void _handler_repeat (mixed $handler_id, mixed $args, mixed &$data)
 void _handler_view (mixed $handler_id, mixed $args, mixed &$data)
 void _handler_welcome (mixed $handler_id, mixed $args, mixed &$data)
 bool _load_event (mixed $id)
 void _on_handle (mixed $handler_id, mixed $args, mixed &$data)
 void _on_initialize ()
 bool _prepare_creation_datamanager (string $schema)
 void _show_create (mixed $handler_id, mixed &$data)
 void _show_delete (mixed $handler_id, mixed &$data)
 void _show_edit (mixed $handler_id, mixed &$data)
 void _show_repeat (mixed $handler_id, mixed &$data)
 void _show_view (mixed $handler_id, mixed &$data)
 void _show_welcome (mixed $handler_id, mixed &$data)
Variables
midcom_helper_datamanager $_datamanager = null (line 55)

The datamanager instance controlling the event to show, or null in case there is no event at this time. The request data key 'datamanager' is set to a reference to this member during class startup.

  • access: private
midcom_baseclasses_database_event $_event = null (line 27)

The event to show, or null in case that there is no event set at this time.

The request data key 'event' is set to a reference to this member during class startup.

  • access: private
int $_master_event = null (line 71)

The master event ID to use as _root_event::up.

  • access: private
midcom_baseclasses_database_event $_root_event = null (line 63)

The root event to use with this topic.

  • access: private
Array $_schemadb = array() (line 35)

The schema database accociated with the topic.

  • access: private
Array $_schemadb_index = array() (line 44)

An index over the schema database accociated with the topic mapping schema keys to their names. For ease of use.

  • access: private

Inherited Variables

Inherited from midcom_baseclasses_components_request_admin

midcom_baseclasses_components_request_admin::$_local_toolbar
midcom_baseclasses_components_request_admin::$_meta_toolbar
midcom_baseclasses_components_request_admin::$_topic_toolbar

Inherited from midcom_baseclasses_components_request

midcom_baseclasses_components_request::$errcode
midcom_baseclasses_components_request::$errstr
midcom_baseclasses_components_request::$_component
midcom_baseclasses_components_request::$_component_data
midcom_baseclasses_components_request::$_config
midcom_baseclasses_components_request::$_handler
midcom_baseclasses_components_request::$_i18n
midcom_baseclasses_components_request::$_l10n
midcom_baseclasses_components_request::$_l10n_midcom
midcom_baseclasses_components_request::$_request_data
midcom_baseclasses_components_request::$_request_switch
midcom_baseclasses_components_request::$_topic
Methods
Constructor net_nemein_calendar_admin (line 73)
net_nemein_calendar_admin net_nemein_calendar_admin (mixed $topic, mixed $config)
_delete_record (line 986)
void _delete_record ()
_dm_create_callback (line 398)

Callback for the datamanager create mode.

  • access: protected
void _dm_create_callback (mixed &$datamanager)
_handler_create (line 538)

Prepares everything to create a new event. When processing the DM results, it will redirect to the view mode on the save event, and to the welcome page otherwise. It uses sessioning to keep track of the newly created event ID.

Preparation include the toolbar setup.

  • access: private
void _handler_create (mixed $handler_id, mixed $args, mixed &$data)
_handler_delete (line 945)
void _handler_delete (mixed $handler_id, mixed $args, mixed &$data)
_handler_edit (line 700)

Locates the article to edit and sets everything up. When processing the DM results, it will redirect to the view mode on both the save and cancel events.

Preparation include the toolbar setup.

  • access: private
void _handler_edit (mixed $handler_id, mixed $args, mixed &$data)
_handler_repeat (line 789)
void _handler_repeat (mixed $handler_id, mixed $args, mixed &$data)
_handler_view (line 761)

Locates the event to view and prepares everything for the view run.

This includes the toolbar preparations and the preparation of the article and datamanager instances.

  • access: private
void _handler_view (mixed $handler_id, mixed $args, mixed &$data)
_handler_welcome (line 513)

Welcome page handler.

  • access: private
void _handler_welcome (mixed $handler_id, mixed $args, mixed &$data)
_init_root_event (line 161)

Load the root event from database or create it

  • access: private
void _init_root_event ()
_load_event (line 444)

This internal helper loads the event identified by the passed argument from the database.

When returning false, it sets errstr and errcode accordingly, you jsut have to pass the result to the handle callee.

In addition, it will set the currently active leaf to the set ID.

  • return: Indicating success.
  • access: private
bool _load_event (mixed $id)
  • mixed $id: A valid event identifier that can be used to load an event from the database. This can either be an ID or a GUID.
_load_schema_database (line 250)

Internal helper, loads the configured schema database into the class.

It is not yet evaluated by a datamanager, only the file is loaded.

void _load_schema_database ()
_on_handle (line 290)

General request initialization, which populates the topic toolbar.

void _on_handle (mixed $handler_id, mixed $args, mixed &$data)

Redefinition of:
midcom_baseclasses_components_request::_on_handle()
Component specific initialization code for the handle phase. AIS, for example, uses this to preapre the toolbar arrays. The name of the request handler is passed as an argumet to the event handler.
_on_initialize (line 85)

The initialization tries to load the root event and will create one if it couldn't be found. It will also load the Datamanager schema database, which is used here and there for the toolbars etc.

  • access: private
void _on_initialize ()

Redefinition of:
midcom_baseclasses_components_request::_on_initialize()
Initialization event handler, called at the end of the initialization process immediately before the request handler configuration is read.
_prepare_creation_datamanager (line 374)

Prepares the datamanager for creation of a new event. When returning false, it sets errstr and errcode accordingly.

  • return: Indicating success
  • access: private
bool _prepare_creation_datamanager (string $schema)
  • string $schema: The name of the schema to initialize for
_prepare_datamanager (line 340)

Prepares the datamanager for the loaded event. When returning false, it sets errstr and errcode accordingly.

  • return: Indicating success
  • access: private
bool _prepare_datamanager ()
_prepare_local_toolbar (line 478)

This internal helper adds the edit and delete links to the local toolbar.

  • access: private
void _prepare_local_toolbar ()
_prepare_topic_toolbar (line 302)

This function adds all of the standard items (configuration and create links) to the topic toolbar.

  • access: private
void _prepare_topic_toolbar ()
_show_create (line 686)

Renders the selected event using the datamnager view mode.

  • access: private
void _show_create (mixed $handler_id, mixed &$data)
_show_delete (line 981)

Renders the selected article using the datamanager view mode.

  • access: private
void _show_delete (mixed $handler_id, mixed &$data)
_show_edit (line 749)

Renders the selected article using the datamnager view mode.

  • access: private
void _show_edit (mixed $handler_id, mixed &$data)
_show_repeat (line 940)
void _show_repeat (mixed $handler_id, mixed &$data)
_show_view (line 784)

Renders the selected article using the datamanager view mode.

  • access: private
void _show_view (mixed $handler_id, mixed &$data)
_show_welcome (line 523)

Renders the welcome page.

  • access: private
void _show_welcome (mixed $handler_id, mixed &$data)

Inherited Methods

Inherited From midcom_baseclasses_components_request_admin

 midcom_baseclasses_components_request_admin::midcom_baseclasses_components_request_admin()
 midcom_baseclasses_components_request_admin::_handler_config_dm()
 midcom_baseclasses_components_request_admin::_handler_config_dm_prepare()
 midcom_baseclasses_components_request_admin::_on_handler_config_dm_prepared()
 midcom_baseclasses_components_request_admin::_on_handler_config_dm_preparing()
 midcom_baseclasses_components_request_admin::_on_handler_config_dm_saved()
 midcom_baseclasses_components_request_admin::_show_config_dm()

Inherited From midcom_baseclasses_components_request

 midcom_baseclasses_components_request::midcom_baseclasses_components_request()
 midcom_baseclasses_components_request::can_handle()
 midcom_baseclasses_components_request::get_metadata()
 midcom_baseclasses_components_request::handle()
 midcom_baseclasses_components_request::initialize()
 midcom_baseclasses_components_request::show()
 midcom_baseclasses_components_request::_on_get_metadata()
 midcom_baseclasses_components_request::_on_handle()
 midcom_baseclasses_components_request::_on_initialize()
 midcom_baseclasses_components_request::_on_show()
 midcom_baseclasses_components_request::_prepare_handler()
 midcom_baseclasses_components_request::_prepare_request_switch()

Documentation generated on Mon, 21 Nov 2005 18:08:56 +0100 by phpDocumentor 1.3.0RC3