File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace Loki \Components \Util \Component ;
44
5+ use Loki \Components \Util \Block \GetElementId ;
56use Magento \Framework \View \Element \Block \ArgumentInterface ;
67use Loki \Components \Component \ComponentInterface ;
78use Loki \Components \Util \CamelCaseConvertor ;
@@ -12,6 +13,7 @@ class JsDataProvider implements ArgumentInterface
1213{
1314 public function __construct (
1415 private readonly ComponentUtil $ componentUtil ,
16+ private readonly GetElementId $ getElementId ,
1517 private readonly IdConvertor $ idConvertor ,
1618 private readonly CamelCaseConvertor $ camelCaseConvertor ,
1719 ) {
@@ -26,7 +28,7 @@ public function getComponentData(ComponentInterface $component): array
2628
2729 $ block = $ component ->getBlock ();
2830 $ data ['blockId ' ] = $ block ->getNameInLayout ();
29- $ data ['elementId ' ] = $ this ->componentUtil -> convertToElementId ($ block-> getNameInLayout () );
31+ $ data ['elementId ' ] = $ this ->getElementId -> execute ($ block );
3032 $ data ['validators ' ] = $ component ->getValidators ();
3133 $ data ['filters ' ] = $ component ->getFilters ();
3234
You can’t perform that action at this time.
0 commit comments