1 | <?php |
||
25 | final class AdminExtractor implements ExtractorInterface, LabelTranslatorStrategyInterface |
||
26 | { |
||
27 | private const PUBLIC_ADMIN_METHODS = [ |
||
28 | 'getShow', |
||
29 | 'getDatagrid', |
||
30 | 'getList', |
||
31 | 'getForm', |
||
32 | ]; |
||
33 | |||
34 | private const BREADCRUMB_ACTIONS = [ |
||
35 | 'list', |
||
36 | 'edit', |
||
37 | 'create', |
||
38 | 'update', |
||
39 | 'batch', |
||
40 | 'delete', |
||
41 | ]; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | private $prefix = ''; |
||
47 | |||
48 | /** |
||
49 | * @var MessageCatalogue|null |
||
50 | */ |
||
51 | private $catalogue; |
||
52 | |||
53 | /** |
||
54 | * @var Pool |
||
55 | */ |
||
56 | private $adminPool; |
||
57 | |||
58 | /** |
||
59 | * @var LabelTranslatorStrategyInterface|null |
||
60 | */ |
||
61 | private $labelStrategy; |
||
62 | |||
63 | /** |
||
64 | * @var string|null |
||
65 | */ |
||
66 | private $domain; |
||
67 | |||
68 | /** |
||
69 | * @var BreadcrumbsBuilderInterface |
||
70 | */ |
||
71 | private $breadcrumbsBuilder; |
||
72 | |||
73 | public function __construct(Pool $adminPool, BreadcrumbsBuilderInterface $breadcrumbsBuilder) |
||
78 | |||
79 | public function extract($resource, MessageCatalogue $catalogue) |
||
109 | |||
110 | public function setPrefix($prefix): void |
||
114 | |||
115 | public function getLabel($label, $context = '', $type = ''): string |
||
123 | } |
||
124 |