Remove role.

@param  string $name
420035
protected function removeRole($name)
    {
        $role = $this->authManager->getRole($name);
        if (empty($role)) {
            throw new InvalidParamException("Role '{$role}' does not exists");
        }
        echo "    > removing role $role->name ...";
        $time = microtime(true);
        $this->authManager->remove($role);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
    }
1234606
public function delete(string $name): void
    {
        !$this->all && $this->inputs();

        Arrays::delete($this->input, $name);
        $this->cache = [];
    }
169022
public static function delete($name)
    {
        $keys = explode('.', $name);
        switch (count($keys)) {
            case 1:
                unset(self::$config[$keys[0]]);
                break;
            case 2:
                unset(self::$config[$keys[0]][$keys[1]]);
                break;
            case 3:
                unset(self::$config[$keys[0]][$keys[1]][$keys[2]]);
                break;
        }
    }
933875
public function assignRole ($name)
		{
			$auth = Yii::$app->getAuthManager();
			$role = $auth->getRole($name);
			if ($role)
				$auth->assign($role, $this->id);
		}
516121
public function remove($name)
    {
        if ($this->rootModule && $name === $this->rootModule->getName()) {
            $this->rootModule = null;
        }

        unset($this->modules[$name]);
    }
304215
public function removeHeader(string $name)
    {
        parent::removeHeader($name);

        if (\stripos($name, "cookie") === 0) {
            $this->cookies = [];
        }
    }
1297792
public function unregister($name)
    {
        unset($this->handlers[$name]);

        if ($name === $this->selectedHandler) {
            reset($this->handlers);
            $this->selectedHandler = key($this->handlers);
        }
    }
1312045
function removeCommand($name)
    {
        unset($this->commands[$name]);
        foreach ($this->groups as $key => $commands){
            foreach ($commands as $i => $c){
                if ($c[0] == $name){
                    unset($this->groups[$key][$i]);
                }
            }
        }
    }
1370841
public static function permissionDelete($name, $action): void
    {
        $permission = HCAclPermission::where('name', $name)
            ->where('action', $action)
            ->first();

        if (!is_null($permission)) {
            RolesPermissionsConnections::where('permission_id', $permission->id)->delete();

            $permission->forceDelete();
        }
    }
550792
public function removeTick($name)
    {
        if (isset($this->ticks[$name])) {
            $this->ticks[$name]->setManager(null);
            unset($this->ticks[$name]);
        }
    }
714734
public static function clear($name): void
    {
        if (static::$immutable) {
            return;
        }

        if (\function_exists('\\putenv')) {
            \putenv($name);
        }

        unset($_ENV[$name], $_SERVER[$name]);
    }
280136
function disable(string $name) {
        $pos = array_search($name, $this->_enableList);
        if ($pos === false)
            return;
        unset($this->_enableList[$pos]);
    }
1150654
public static function removeSessionValue(string $name)
    {
        self::ensureSession();
        
        try {
            unset($_SESSION[$name]);
            session_write_close();
        }
        catch (\Exception $ex) {
            error_log("Error trying to remove session value. ");
        }
    }
811684
public function removeChild($name)
    {
        if (isset($this->children[$name])) {
            unset($this->children[$name]);
        }

        return $this;
    }
28008
protected function removeHeader(string $name)
    {
        $normalized = strtolower($name);

        if (isset($this->headerNameMap[$normalized])) {
            $name = $this->headerNameMap[$normalized];
            unset($this->headers[$name], $this->headerNameMap[$normalized]);
        }
    }
829502
public function remove($name)
    {
        if (isset($this->aliasIndex[$name])) {
            $this->remove($this->aliasIndex[$name]);

            return;
        }

        if (isset($this->shortNameIndex[$name])) {
            $this->remove($this->shortNameIndex[$name]);

            return;
        }

        unset($this->commands[$name]);

        foreach ($this->shortNameIndex as $shortName => $targetName) {
            if ($name === $targetName) {
                unset($this->shortNameIndex[$shortName]);
            }
        }

        foreach ($this->aliasIndex as $alias => $targetName) {
            if ($name === $targetName) {
                unset($this->aliasIndex[$alias]);
            }
        }
    }
377985
public function remove(Role $role)
    {
        $role->delete();

        Alert::info(__('Role was removed'));

        return redirect()->route('platform.systems.roles');
    }