[TASK] Clean up MetaTagManager API
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / MetaTag / MetaTagManagerInterface.php
1 <?php
2 declare(strict_types = 1);
3
4 namespace TYPO3\CMS\Core\MetaTag;
5
6 /*
7 * This file is part of the TYPO3 CMS project.
8 *
9 * It is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, either version 2
11 * of the License, or any later version.
12 *
13 * For the full copyright and license information, please read the
14 * LICENSE.txt file that was distributed with this source code.
15 *
16 * The TYPO3 project - inspiring people to share!
17 */
18
19 interface MetaTagManagerInterface
20 {
21 /**
22 * Add a property
23 *
24 * @param string $property
25 * @param string $content
26 * @param array $subProperties
27 * @param bool $replace
28 * @param string $type
29 */
30 public function addProperty(string $property, string $content, array $subProperties = [], bool $replace = false, string $type = '');
31
32 /**
33 * Get a specific property that is set before
34 *
35 * @param string $property
36 * @param string $type
37 * @return array
38 */
39 public function getProperty(string $property, string $type = ''): array;
40
41 /**
42 * Check if this manager can handle the given property
43 *
44 * @param string $property
45 * @return bool
46 */
47 public function canHandleProperty(string $property): bool;
48
49 /**
50 * Returns an array with all properties that can be handled by the manager
51 *
52 * @return array
53 */
54 public function getAllHandledProperties(): array;
55
56 /**
57 * Render all registered properties of this manager
58 *
59 * @return string
60 */
61 public function renderAllProperties(): string;
62
63 /**
64 * Render a meta tag for a specific property
65 *
66 * @param string $property
67 * @return string
68 */
69 public function renderProperty(string $property): string;
70
71 /**
72 * Remove one property from the MetaTagManager
73 * If there are multiple occurrences of a property, they all will be removed
74 *
75 * @param string $property
76 * @param string $type
77 */
78 public function removeProperty(string $property, string $type = '');
79
80 /**
81 * Unset all properties of this MetaTagManager
82 */
83 public function removeAllProperties();
84 }