SecurityHandlerInterface
last analyzed

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 36
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
isGranted() 0 1 ?
getBaseRole() 0 1 ?
buildSecurityInformation() 0 1 ?
createObjectSecurity() 0 1 ?
deleteObjectSecurity() 0 1 ?
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\AdminBundle\Security\Handler;
15
16
use Sonata\AdminBundle\Admin\AdminInterface;
17
18
/**
19
 * @author Thomas Rabaix <[email protected]>
20
 */
21
interface SecurityHandlerInterface
22
{
23
    /**
24
     * @param string|array $attributes
25
     * @param mixed|null   $object
26
     *
27
     * @return bool
28
     */
29
    public function isGranted(AdminInterface $admin, $attributes, $object = null);
30
31
    /**
32
     * Get a sprintf template to get the role.
33
     *
34
     * @return string
35
     */
36
    public function getBaseRole(AdminInterface $admin);
37
38
    /**
39
     * @return array<string, mixed>
0 ignored issues
show
Documentation introduced by
The doc-type array<string, could not be parsed: Expected ">" at position 5, but found "end of type". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
40
     */
41
    public function buildSecurityInformation(AdminInterface $admin);
42
43
    /**
44
     * Create object security, fe. make the current user owner of the object.
45
     *
46
     * @param object $object
47
     */
48
    public function createObjectSecurity(AdminInterface $admin, $object);
49
50
    /**
51
     * Remove object security.
52
     *
53
     * @param object $object
54
     */
55
    public function deleteObjectSecurity(AdminInterface $admin, $object);
56
}
57