| @@ 72-84 (lines=13) @@ | ||
| 69 | * |
|
| 70 | * @return midcom_helper_datamanager2_controller_simple |
|
| 71 | */ |
|
| 72 | private function _load_controller() |
|
| 73 | { |
|
| 74 | $this->_load_schemadb(); |
|
| 75 | $controller = midcom_helper_datamanager2_controller::create('simple'); |
|
| 76 | $controller->schemadb =& $this->_schemadb; |
|
| 77 | $controller->set_storage($this->_article); |
|
| 78 | ||
| 79 | if (! $controller->initialize()) |
|
| 80 | { |
|
| 81 | throw new midcom_error("Failed to initialize a DM2 controller instance for article {$this->_article->id}."); |
|
| 82 | } |
|
| 83 | return $controller; |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * Displays an article edit view. |
|
| @@ 52-64 (lines=13) @@ | ||
| 49 | * |
|
| 50 | * @return midcom_helper_datamanager2_controller |
|
| 51 | */ |
|
| 52 | private function _load_controller() |
|
| 53 | { |
|
| 54 | $this->_load_schemadb(); |
|
| 55 | $this->_modify_schema(); |
|
| 56 | $controller = midcom_helper_datamanager2_controller::create('simple'); |
|
| 57 | $controller->schemadb =& $this->_schemadb; |
|
| 58 | $controller->set_storage($this->_deliverable, $this->_schema); |
|
| 59 | if (! $controller->initialize()) |
|
| 60 | { |
|
| 61 | throw new midcom_error("Failed to initialize a DM2 controller instance for deliverable {$this->_deliverable->id}."); |
|
| 62 | } |
|
| 63 | return $controller; |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Alter the schema based on the current operation |
|