‪TYPO3CMS  11.5
NotifySoftReferenceParser.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 {
25  protected string ‪$parserKey = '';
26  protected array ‪$parameters = [];
27 
32  public function ‪setParserKey(string ‪$parserKey, array ‪$parameters): void
33  {
34  $this->parserKey = ‪$parserKey;
35  $this->parameters = ‪$parameters;
36  }
37 
38  public function ‪getParserKey(): string
39  {
40  return ‪$this->parserKey;
41  }
42 
43  public function ‪parse(string $table, string $field, int $uid, string $content, string $structurePath = ''): ‪SoftReferenceParserResult
44  {
45  // Simple notification
47  '',
48  [
49  [
50  'matchString' => $content,
51  ],
52  ]
53  );
54  }
55 
59  public function ‪findRef(string $table, string $field, int $uid, string $content, string $spKey, array $spParams, string $structurePath = '')
60  {
61  return $this->‪parse($table, $field, $uid, $content, $structurePath)->toNullableArray();
62  }
63 }
‪TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserResult\create
‪static create(string $content, array $elements)
Definition: SoftReferenceParserResult.php:48
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser\$parserKey
‪string $parserKey
Definition: NotifySoftReferenceParser.php:25
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser\setParserKey
‪setParserKey(string $parserKey, array $parameters)
Definition: NotifySoftReferenceParser.php:32
‪TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserInterface
Definition: SoftReferenceParserInterface.php:31
‪TYPO3\CMS\Core\DataHandling\SoftReference
Definition: AbstractSoftReferenceParser.php:18
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser\getParserKey
‪getParserKey()
Definition: NotifySoftReferenceParser.php:38
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser\parse
‪parse(string $table, string $field, int $uid, string $content, string $structurePath='')
Definition: NotifySoftReferenceParser.php:43
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser
Definition: NotifySoftReferenceParser.php:24
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser\findRef
‪findRef(string $table, string $field, int $uid, string $content, string $spKey, array $spParams, string $structurePath='')
Definition: NotifySoftReferenceParser.php:59
‪TYPO3\CMS\Core\DataHandling\SoftReference\NotifySoftReferenceParser\$parameters
‪array $parameters
Definition: NotifySoftReferenceParser.php:26
‪TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserResult
Definition: SoftReferenceParserResult.php:43