Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/Configuration/UI/Mapper/CustomTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private function getAttributeTypeMapper(

foreach ($this->customTagAttributeMappers as $attributeMapper) {
// get first supporting, order of these mappers is controlled by 'priority' DI tag attribute
if ($attributeMapper->supports($attributeType)) {
if ($attributeMapper->supports($tagName, $attributeName, $attributeType)) {
return $this->supportedTagAttributeMappersCache[$attributeType] = $attributeMapper;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ interface AttributeMapper
/**
* Check if mapper supports given Custom Tag attribute type.
*
* @param string $tagName
* @param string $attributeName
* @param string $attributeType
*
* @return bool
*/
public function supports(string $attributeType): bool;
public function supports(string $tagName, string $attributeName, string $attributeType): bool;

/**
* Map Configuration for the given Custom Tag attribute type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
final class ChoiceAttributeMapper extends CommonAttributeMapper implements AttributeMapper
{
public function supports(string $attributeType): bool
public function supports(string $tagName, string $attributeName, string $attributeType): bool
{
return 'choice' === $attributeType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CommonAttributeMapper implements AttributeMapper
/**
* {@inheritdoc}
*/
public function supports(string $attributeType): bool
public function supports(string $tagName, string $attributeName, string $attributeType): bool
{
return true;
}
Expand Down