protected function prepareForPresentation()
    {
        if ($this->prepared) {
            return;
        }

        $this->permissionGroups       = new Collection;
        $this->ungroupedPermissions   = [];
        $this->groupedPermissionIndex = [];

        $this->loadPermissionsFromModules()
             ->loadCustomPermissions()
             ->loadCustomPermissionGroups()
             ->addUngroupedPermissionGroup()
             ->filterEmptyGroups();
    }