‪TYPO3CMS  9.5
TYPO3\CMS\Core\MetaTag\GenericMetaTagManager Class Reference
Inheritance diagram for TYPO3\CMS\Core\MetaTag\GenericMetaTagManager:
TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface

Public Member Functions

 addProperty (string $property, string $content, array $subProperties=[], bool $replace=false, string $type='name')
 
array getProperty (string $property, string $type='name')
 
array getAllHandledProperties ()
 
string renderAllProperties ()
 
string renderProperty (string $property)
 
 removeProperty (string $property, string $type='')
 
 removeAllProperties ()
 
bool canHandleProperty (string $property)
 

Protected Attributes

string $subPropertySeparator = ':'
 
array $properties = array( )
 

Detailed Description

Handles typical meta tags (non-grouped). Use AbstractMetaTagManager to create you own MetaTags, this class is final by design

Definition at line 23 of file GenericMetaTagManager.php.

Member Function Documentation

◆ addProperty()

TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::addProperty ( string  $property,
string  $content,
array  $subProperties = [],
bool  $replace = false,
string  $type = 'name' 
)

Add a property (including subProperties)

Parameters
string$property
string$content
array$subProperties
bool$replace
string$type

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 46 of file GenericMetaTagManager.php.

References TYPO3\CMS\Core\MetaTag\GenericMetaTagManager\removeProperty().

◆ canHandleProperty()

bool TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::canHandleProperty ( string  $property)
Parameters
string$property
Returns
‪bool

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 162 of file GenericMetaTagManager.php.

◆ getAllHandledProperties()

array TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::getAllHandledProperties ( )

Returns an array with all properties that can be handled by this manager

Returns
‪array

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 83 of file GenericMetaTagManager.php.

◆ getProperty()

array TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::getProperty ( string  $property,
string  $type = 'name' 
)

Get the data of a specific property

Parameters
string$property
string$type
Returns
‪array

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 68 of file GenericMetaTagManager.php.

◆ removeAllProperties()

TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::removeAllProperties ( )

Unset all properties

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 153 of file GenericMetaTagManager.php.

◆ removeProperty()

TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::removeProperty ( string  $property,
string  $type = '' 
)

Remove one property from the MetaTagManager If there are multiple occurrences of a property, they all will be removed

Parameters
string$property
string$type

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 141 of file GenericMetaTagManager.php.

Referenced by TYPO3\CMS\Core\MetaTag\GenericMetaTagManager\addProperty().

◆ renderAllProperties()

string TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::renderAllProperties ( )

Render all registered properties of this manager

Returns
‪string

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 93 of file GenericMetaTagManager.php.

References TYPO3\CMS\Core\MetaTag\GenericMetaTagManager\renderProperty().

◆ renderProperty()

string TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::renderProperty ( string  $property)

Render a specific property including subproperties of that property

Parameters
string$property
Returns
‪string

Implements TYPO3\CMS\Core\MetaTag\MetaTagManagerInterface.

Definition at line 109 of file GenericMetaTagManager.php.

Referenced by TYPO3\CMS\Core\MetaTag\GenericMetaTagManager\renderAllProperties().

Member Data Documentation

◆ $properties

array TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::$properties = array( )
protected

Array of properties that are set by the manager

Definition at line 35 of file GenericMetaTagManager.php.

◆ $subPropertySeparator

string TYPO3\CMS\Core\MetaTag\GenericMetaTagManager::$subPropertySeparator = ':'
protected

The separator to define subproperties like og:image:width

Definition at line 29 of file GenericMetaTagManager.php.