Skip to content

Commit

Permalink
Refactor RenderElementExtensionTest
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Jan 6, 2021
1 parent 1ef518a commit 5dd14b7
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 97 deletions.
3 changes: 2 additions & 1 deletion src/Twig/Extension/RenderElementExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,9 @@ public function renderRelationElement($element, FieldDescriptionInterface $field

if (null === $propertyPath) {
// For BC kept associated_tostring option behavior
// NEXT_MAJOR Remove next line.
$method = $fieldDescription->getOption('associated_tostring');

// NEXT_MAJOR: Remove the "if" part and leave the "else" part
if ($method) {
@trigger_error(
'Option "associated_tostring" is deprecated since version 2.3 and will be removed in 4.0. Use "associated_property" instead.',
Expand Down
8 changes: 0 additions & 8 deletions src/Twig/Extension/XEditableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ public function getXEditableType(string $type)
return $this->xEditableTypeMapping[$type] ?? false;
}

/**
* @param string[] $xEditableTypeMapping
*/
public function setXEditableTypeMapping($xEditableTypeMapping)
{
$this->xEditableTypeMapping = $xEditableTypeMapping;
}

/**
* Return xEditable choices based on the field description choices options & catalogue options.
* With the following choice options:
Expand Down
Loading

0 comments on commit 5dd14b7

Please sign in to comment.