/** * Make sure the group folder exists. Needs to be public * so that the template post-save can have access to it. */ public function ensureFolderExists() { $fs = new Filesystem(); $path = $this->getFolderPath(); if (isset($path) && !$fs->isDir($path)) { $fs->mkDir($path, FALSE); } }