Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$doodle = $modx->getService('doodles','Doodles',$modx->getOption('doodles.core_path',null,$modx->getOption('core_path').'components/doodles/').'model/doodles/');
if (!($doodle instanceof Doodles)) {
$hook->addError('error_message','Unable to load doodle service.');
return false;
$newEntry = $modx->newObject('Doodle');
/* save */
if ($newEntry->save() == false) {
$hook->addError('error_message','Unable to add new doodle entry to the database.');
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.