| 84 |
return drawing_render_canvas($canvas_id, $canvas); |
return drawing_render_canvas($canvas_id, $canvas); |
| 85 |
} |
} |
| 86 |
|
|
|
|
|
| 87 |
/** |
/** |
| 88 |
* Retrieves the structured array that defines a given canvas. |
* Retrieves the structured array that defines a given canvas. |
| 89 |
* |
* |
| 141 |
$canvas['#theme'] = $canvas_id; |
$canvas['#theme'] = $canvas_id; |
| 142 |
} |
} |
| 143 |
} |
} |
| 144 |
|
$canvas['#method'] = drawing_get_method($canvas); |
| 145 |
$output = drupal_render($canvas); |
$output = drupal_render($canvas); |
| 146 |
return $output; |
return $output; |
| 147 |
} |
} |
| 151 |
* |
* |
| 152 |
* @param $canvas |
* @param $canvas |
| 153 |
* The canvas to process |
* The canvas to process |
|
* @param $attributes |
|
|
* An array of attributes to pass down. |
|
| 154 |
* @return |
* @return |
| 155 |
* The updated canvas. |
* The updated canvas. |
| 156 |
*/ |
*/ |
| 157 |
function drawing_pre_render_canvas($canvas) { |
function drawing_pre_render_canvas($canvas) { |
|
if (!isset($canvas['#method'])) { |
|
|
$canvas['#method'] = drawing_get_method($canvas); |
|
|
} |
|
| 158 |
if ($canvas['#type']) { |
if ($canvas['#type']) { |
| 159 |
$canvas['#type'] = 'drawing_'. $canvas['#type']; |
$canvas['#type'] = 'drawing_'. $canvas['#type']; |
| 160 |
$canvas['#handler'] = $canvas['#method'] .'_'. $canvas['#type']; |
$canvas['#handler'] = $canvas['#method'] .'_'. $canvas['#type']; |