Class midcom_helper_datamanager_provider

Description

This is a helper class to encapsulate datamanager usage. It should be used instead of

the normal

Located in /midcom.core/midcom/helper/datamanager_provider.php (line 13)


	
			
Variable Summary
 mixed $datamanager
 int $errcode
 string $errstr
 string $object_id
 mixed $_object
 array $_schema
Method Summary
 midcom_helper_datamanager_provider midcom_helper_datamanager_provider (mixed $schema, [mixed $object = null])
 void display ()
 object midcom_helper_datamanager_provider &factory (string $schema_path, [mixed $show_js = true], [mixed $object = null])
 void get_object_id ()
 string get_relocation_url ()
 void load_schema_database (mixed $path)
 void on_datamanager_saved (none 0)
 void run ()
 void set_object_id (string $id)
 void set_relocation_url (mixed $url)
 bool _prepare_creation_datamanager ([mixed $view = true], string $schema)
 datamanager _prepare_datamanager ([bool $view = true])
Variables
mixed $datamanager = null (line 18)

the dm instance to work on

int $errcode (line 56)

error code

string $errstr (line 51)

Error string

string $object_id = null (line 45)

Object id to use for the article, defaults to guid.

  • var: object id
string $reloaction_url = "" (line 38)

The reloaction url.

  • var: reloaction url
mixed $_object = null (line 31)

pointer to the current dataobject, null

if object creation

array $_schema = null (line 24)

the datamanager schema to use.

Methods
Constructor midcom_helper_datamanager_provider (line 58)
midcom_helper_datamanager_provider midcom_helper_datamanager_provider (mixed $schema, [mixed $object = null])
display (line 96)

Display the form

void display ()
factory (line 70)

factory function

  • return: or midcom_helper_exception
object midcom_helper_datamanager_provider &factory (string $schema_path, [mixed $show_js = true], [mixed $object = null])
  • string $schema_path: schema path
get_object_id (line 176)
void get_object_id ()
get_relocation_url (line 172)

Helper method, returns the reloaction url

  • return: the relocation url;
string get_relocation_url ()
load_schema_database (line 194)

Loads a schema database

  • access: private
void load_schema_database (mixed $path)
on_datamanager_canceled (line 157)

extend this if you want another canceld behavior

void on_datamanager_canceled ()
on_datamanager_editing (line 136)

Stub function to be accessed if you want to do something special in editing

void on_datamanager_editing ()
on_datamanager_failed (line 128)

event functiion for failure

void on_datamanager_failed ()
on_datamanager_saved (line 142)

extend this if you want another saved behaviour.

  • return: -> you should relocate.
void on_datamanager_saved (none 0)
  • none 0
run (line 103)

run the dm form

void run ()
set_object_id (line 165)

set the id to be used at the end of the relocation url

  • access: public
void set_object_id (string $id)
  • string $id: id to be used.
set_relocation_url (line 186)

Set the reloaction url base.

void set_relocation_url (mixed $url)
_prepare_creation_datamanager (line 264)

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

  • return: Indicating success
  • access: private
bool _prepare_creation_datamanager ([mixed $view = true], string $schema)
  • string $schema: The name of the schema to initialize for
_prepare_datamanager (line 232)

Prepares the datamanager for the object.

  • return: or exception.
  • access: private
datamanager _prepare_datamanager ([bool $view = true])
  • bool $view: view to signal to datamanager that it will show the edit form.

Documentation generated on Tue, 15 Aug 2006 12:26:34 +0300 by phpDocumentor 1.3.0RC3