public static function remove($groupname)
    {
        $grav = Grav::instance();

        /** @var Config $config */
        $config = $grav['config'];

        $blueprints = new Blueprints();
        $blueprint = $blueprints->get('user/group');

        $type = 'groups';

        $groups = $config->get($type);
        unset($groups[$groupname]);
        $config->set($type, $groups);

        $filename = CompiledYamlFile::instance($grav['locator']->findResource("config://{$type}.yaml"));

        $obj = new Data($groups, $blueprint);
        $obj->file($filename);
        $obj->save();

        return true;
    }
public static function remove($groupname)
    {
        $grav = Grav::instance();

        /** @var Config $config */
        $config = $grav['config'];

        $blueprints = new Blueprints();
        $blueprint = $blueprints->get('user/group');

        $type = 'groups';

        $groups = $config->get($type);
        unset($groups[$groupname]);
        $config->set($type, $groups);

        $filename = CompiledYamlFile::instance($grav['locator']->findResource("config://{$type}.yaml"));

        $obj = new Data($groups, $blueprint);
        $obj->file($filename);
        $obj->save();

        return true;
    }
public static function remove ( $ groupname ) { $ grav = Grav :: instance ( ) ; /** @var Config $config */ $ config = $ grav [ 'config' ] ; $ blueprints = new Blueprints ( ) ; $ blueprint = $ blueprints -> get ( 'user/group' ) ; $ type = 'groups' ; $ groups = $ config -> get ( $ type ) ; unset ( $ groups [ $ groupname ] ) ; $ config -> set ( $ type , $ groups ) ; $ filename = CompiledYamlFile :: instance ( $ grav [ 'locator' ] -> findResource ( "config://{$type}.yaml" ) ) ; $ obj = new Data ( $ groups , $ blueprint ) ; $ obj -> file ( $ filename ) ; $ obj -> save ( ) ; return true ; }
Remove a group

@param string $groupname

@return bool True if the action was performed
Remove a group