Skip to content

Commit

Permalink
Merge pull request #2 from svenpet90/1-replace-svenpetersenfluid-stim…
Browse files Browse the repository at this point in the history
…ulus-dep-with-sschtypo3_encore

[REFACTOR] Using Ssch/Typo3_encore AbstractViewHelper instead
  • Loading branch information
svenpet90 authored Apr 18, 2023
2 parents d7b2d04 + b31a1cc commit 0961d34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions Classes/ViewHelpers/VueComponentViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@

namespace SvenPetersen\UX\Vue\ViewHelpers;

use SvenPetersen\FluidStimulus\ViewHelpers\AbstractStimulusViewHelper;
use Ssch\Typo3Encore\ViewHelpers\Stimulus\AbstractViewHelper;

class VueComponentViewHelper extends AbstractStimulusViewHelper
class VueComponentViewHelper extends AbstractViewHelper
{
protected $escapeOutput = false;

private AbstractStimulusViewHelper $stimulusFluidViewHelper;

public function __construct(AbstractStimulusViewHelper $stimulusFluidViewHelper)
{
$this->stimulusFluidViewHelper = $stimulusFluidViewHelper;
}

public function initializeArguments(): void
{
$this->registerArgument('name', 'string', 'Name of the Vue component to render', true);
Expand All @@ -31,6 +24,6 @@ public function render(): string
$params['props'] = $this->arguments['props'];
}

return $this->stimulusFluidViewHelper->renderStimulusController('@symfony/ux-vue/vue', $params)->__toString();
return $this->renderStimulusController('@symfony/ux-vue/vue', $params)->__toString();
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
],
"require": {
"svenpetersen/fluid-stimulus": "^0.1",
"ssch/typo3-encore": "^5.0.5",
"symfony/ux-vue": "^2.6"
},
"require-dev": {
Expand Down

0 comments on commit 0961d34

Please sign in to comment.