PHP 8.0.30
Preview: RolesController.php Size: 1.20 KB
/home/certprox/zang.certproxywizard.com/wp/wp-content/plugins/fluentform/app/Http/Controllers/RolesController.php

<?php

namespace FluentForm\App\Http\Controllers;

use FluentForm\Framework\Validator\ValidationException;
use FluentForm\App\Services\Roles\RolesService;

class RolesController extends Controller
{
    public function index(RolesService $rolesService)
    {
        $attributes = $this->request->all();
        
        $sanitizeMap = [
            'search' => 'sanitize_text_field',
        ];
        $attributes = fluentform_backend_sanitizer($attributes, $sanitizeMap);
        
        $result = $rolesService->getRoles($attributes);
        return $this->sendSuccess($result);
    }
    
    public function addCapability(RolesService $rolesService)
    {
        try {
            $attributes = $this->request->all();
            
            $sanitizeMap = [
                'role' => 'sanitize_text_field',
                'capability' => 'sanitize_text_field',
            ];
            $attributes = fluentform_backend_sanitizer($attributes, $sanitizeMap);
            
            $result = $rolesService->setCapability($attributes);
            return $this->sendSuccess($result);
        } catch (ValidationException $exception) {
            return $this->sendError($exception->errors(), 422);
        }
    }
}

Directory Contents

Dirs: 0 × Files: 19

Name Size Perms Modified Actions
3.99 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
706 B lrw-r--r-- 2026-03-30 10:23:19
Edit Download
172 B lrw-r--r-- 2026-03-30 10:23:19
Edit Download
6.50 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
3.34 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
4.32 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
2.59 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
488 B lrw-r--r-- 2026-03-30 10:23:19
Edit Download
778 B lrw-r--r-- 2026-03-30 10:23:19
Edit Download
9.23 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
2.13 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
2.48 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
7.31 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
1.20 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
7.57 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
1.01 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
1.36 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
1.28 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download
4.90 KB lrw-r--r-- 2026-03-30 10:23:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).