private static function createObjects() { try { $objectFolder = AbstractObject::getByPath(Plugin::CONFIG_OBJECTFOLDERPATH_DEFAULT); if (!is_object($objectFolder)) { $objectFolder = new Folder(); $objectFolder->setKey(basename(Plugin::CONFIG_OBJECTFOLDERPATH_DEFAULT)); $objectFolder->setParent(AbstractObject::getByPath(dirname(Plugin::CONFIG_OBJECTFOLDERPATH_DEFAULT))); $objectFolder->save(); } if (!$objectFolder instanceof Folder) { throw new \Exception('Can not use object path [' . Plugin::CONFIG_OBJECTFOLDERPATH_DEFAULT . '] as default participation folder.'); } } catch (\Exception $exception) { throw new \Exception('Unable to create/use participation folder [' . Plugin::CONFIG_OBJECTFOLDERPATH_DEFAULT . ']: ' . $exception->getMessage()); } }