1 | <?php |
||
2 | |||
3 | namespace PhpTek\Exodus\Model; |
||
4 | |||
5 | use SilverStripe\Core\Injector\Injectable; |
||
6 | use SilverStripe\ORM\DataObject; |
||
7 | use SilverStripe\ORM\FieldType\DBInt; |
||
8 | use SilverStripe\ORM\FieldType\DBText; |
||
9 | |||
10 | /** |
||
11 | * A model object that represents a single failed link-rewrite summary. This data is displayed |
||
12 | * at the top of the {@link FailedURLRewriteReport}. |
||
13 | * |
||
14 | * @author Russell Michell <[email protected]> |
||
15 | * @package phptek/silverstripe-exodus |
||
16 | */ |
||
17 | class FailedURLRewriteSummary extends DataObject |
||
18 | { |
||
19 | use Injectable; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private static $table_name = 'FailedURLRewriteSummary'; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
25 | |||
26 | /** |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private static $db = [ |
||
0 ignored issues
–
show
|
|||
31 | 'Text' => DBText::class, |
||
32 | 'ImportID' => DBInt::class, |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * |
||
37 | * Format summary text so all totals are emboldened. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getText() |
||
42 | { |
||
43 | return preg_replace("#([\d]*)#", "<strong>$1</strong>", $this->getField('Text')); |
||
44 | } |
||
45 | } |
||
46 |