Skip to content

Commit

Permalink
Review block jsLayout config added
Browse files Browse the repository at this point in the history
  • Loading branch information
roma84 committed Jun 30, 2016
1 parent 56d73ca commit 75ecd6c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Block/Tab/Product/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ class Review extends \Magento\Review\Block\Product\Review
protected function _prepareLayout()
{
$layout = $this->getLayout();
$reviewForm = $layout->createBlock('Magento\Review\Block\Form', 'product.review.form');
$reviewForm = $layout->createBlock(
'Magento\Review\Block\Form',
'product.review.form',
['data' =>
['jsLayout' =>
['components' =>
['review-form' =>
['component' => 'Magento_Review/js/view/review']
]
]
]
]
);
if ($reviewForm) {
$this->setChild('review_form', $reviewForm);
$layout->addContainer('product.review.form.fields.before', 'Review Form Fields Before');
Expand Down

0 comments on commit 75ecd6c

Please sign in to comment.