function ctools_stylizer_image_processor::command_new_from in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 includes/stylizer.inc \ctools_stylizer_image_processor::command_new_from()
Create a new workspace using the properties of an existing workspace.
File
- includes/
stylizer.inc, line 341 - Create customized CSS and images from palettes created by user input.
Class
Code
function command_new_from($name, $workspace) {
$this
->log("New workspace: {$name} from existing {$workspace}");
if (empty($this->workspaces[$workspace])) {
$this
->log("Workspace {$name} does not exist.", 'error');
return;
}
// Clean up if there was already a workspace there.
if (isset($this->workspaces[$name])) {
imagedestroy($this->workspaces[$name]);
}
$this->workspaces[$name] = $this
->new_image($this->workspace[$workspace]);
$this
->set_current_workspace($name);
}