Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ResourceCustomActionResourceButtonLabel
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 getFallbackText
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\Core\Translator\ValueObjects;
3
4use Apie\Core\Attributes\Description;
5use Apie\Core\Attributes\ExampleValue;
6
7#[Description('Label shown on button for a domain specific action')]
8#[ExampleValue('apie.bounded.test.example.user.action.custom.1234.deactivate.label.authenticated')]
9class ResourceCustomActionResourceButtonLabel extends AbstractTranslation
10{
11    protected const MIDDLE_REGEX = 'action\.custom\.:id\.:action\.label';
12
13    public function getFallbackText(): string
14    {
15        return $this->getPlaceholders()['action'] ?? 'action';
16    }
17}