Skip to content

Commit 8e22bac

Browse files
author
Oleksii Korshenko
committed
Updated php tags format
1 parent 8078623 commit 8e22bac

File tree

15 files changed

+312
-312
lines changed

15 files changed

+312
-312
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/list.phtml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ $_productCollection = $block->getLoadedProductCollection();
2020
$_helper = $this->helper('Magento\Catalog\Helper\Output');
2121
?>
2222
<?php if (!$_productCollection->count()): ?>
23-
<div class="message info empty"><div><?php /* @escapeNotVerified */ echo __('We can\'t find products matching the selection.') ?></div></div>
23+
<div class="message info empty"><div><?= /* @escapeNotVerified */ __('We can\'t find products matching the selection.') ?></div></div>
2424
<?php else: ?>
25-
<?php echo $block->getToolbarHtml() ?>
26-
<?php echo $block->getAdditionalHtml() ?>
25+
<?= $block->getToolbarHtml() ?>
26+
<?= $block->getAdditionalHtml() ?>
2727
<?php
2828
if ($block->getMode() == 'grid') {
2929
$viewMode = 'grid';
@@ -41,7 +41,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
4141
*/
4242
$pos = $block->getPositioned();
4343
?>
44-
<div class="products wrapper <?php /* @escapeNotVerified */ echo $viewMode; ?> products-<?php /* @escapeNotVerified */ echo $viewMode; ?>">
44+
<div class="products wrapper <?= /* @escapeNotVerified */ $viewMode ?> products-<?= /* @escapeNotVerified */ $viewMode ?>">
4545
<ol class="products list items product-items">
4646
<?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
4747
<?php foreach ($_productCollection as $_product): ?>
@@ -55,57 +55,57 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
5555
}
5656
?>
5757
<?php // Product Image ?>
58-
<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
59-
<?php echo $productImage->toHtml(); ?>
58+
<a href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
59+
<?= $productImage->toHtml() ?>
6060
</a>
6161
<div class="product details product-item-details">
6262
<?php
6363
$_productNameStripped = $block->stripTags($_product->getName(), null, true);
6464
?>
6565
<strong class="product name product-item-name">
6666
<a class="product-item-link"
67-
href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>">
68-
<?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
67+
href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>">
68+
<?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_product->getName(), 'name') ?>
6969
</a>
7070
</strong>
71-
<?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
72-
<?php /* @escapeNotVerified */ echo $block->getProductPrice($_product) ?>
73-
<?php echo $block->getProductDetailsHtml($_product); ?>
71+
<?= $block->getReviewsSummaryHtml($_product, $templateType) ?>
72+
<?= /* @escapeNotVerified */ $block->getProductPrice($_product) ?>
73+
<?= $block->getProductDetailsHtml($_product) ?>
7474

7575
<div class="product-item-inner">
76-
<div class="product actions product-item-actions"<?php echo strpos($pos, $viewMode . '-actions') ? $position : ''; ?>>
77-
<div class="actions-primary"<?php echo strpos($pos, $viewMode . '-primary') ? $position : ''; ?>>
76+
<div class="product actions product-item-actions"<?= strpos($pos, $viewMode . '-actions') ? $position : ''; ?>>
77+
<div class="actions-primary"<?= strpos($pos, $viewMode . '-primary') ? $position : ''; ?>>
7878
<?php if ($_product->isSaleable()): ?>
7979
<?php $postParams = $block->getAddToCartPostParams($_product); ?>
80-
<form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
81-
<input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
82-
<input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
83-
<?php echo $block->getBlockHtml('formkey')?>
80+
<form data-role="tocart-form" action="<?= /* @escapeNotVerified */ $postParams['action'] ?>" method="post">
81+
<input type="hidden" name="product" value="<?= /* @escapeNotVerified */ $postParams['data']['product'] ?>">
82+
<input type="hidden" name="<?= /* @escapeNotVerified */ Action::PARAM_NAME_URL_ENCODED ?>" value="<?= /* @escapeNotVerified */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] ?>">
83+
<?= $block->getBlockHtml('formkey') ?>
8484
<button type="submit"
85-
title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
85+
title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
8686
class="action tocart primary">
87-
<span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
87+
<span><?= /* @escapeNotVerified */ __('Add to Cart') ?></span>
8888
</button>
8989
</form>
9090
<?php else: ?>
9191
<?php if ($_product->isAvailable()): ?>
92-
<div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div>
92+
<div class="stock available"><span><?= /* @escapeNotVerified */ __('In stock') ?></span></div>
9393
<?php else: ?>
94-
<div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div>
94+
<div class="stock unavailable"><span><?= /* @escapeNotVerified */ __('Out of stock') ?></span></div>
9595
<?php endif; ?>
9696
<?php endif; ?>
9797
</div>
98-
<div data-role="add-to-links" class="actions-secondary"<?php echo strpos($pos, $viewMode . '-secondary') ? $position : ''; ?>>
98+
<div data-role="add-to-links" class="actions-secondary"<?= strpos($pos, $viewMode . '-secondary') ? $position : ''; ?>>
9999
<?php if ($addToBlock = $block->getChildBlock('addto')): ?>
100-
<?php echo $addToBlock->setProduct($_product)->getChildHtml(); ?>
100+
<?= $addToBlock->setProduct($_product)->getChildHtml() ?>
101101
<?php endif; ?>
102102
</div>
103103
</div>
104104
<?php if ($showDescription):?>
105105
<div class="product description product-item-description">
106-
<?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
107-
<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" title="<?php /* @escapeNotVerified */ echo $_productNameStripped ?>"
108-
class="action more"><?php /* @escapeNotVerified */ echo __('Learn More') ?></a>
106+
<?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
107+
<a href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" title="<?= /* @escapeNotVerified */ $_productNameStripped ?>"
108+
class="action more"><?= /* @escapeNotVerified */ __('Learn More') ?></a>
109109
</div>
110110
<?php endif; ?>
111111
</div>
@@ -115,7 +115,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
115115
<?php endforeach; ?>
116116
</ol>
117117
</div>
118-
<?php echo $block->getToolbarHtml() ?>
118+
<?= $block->getToolbarHtml() ?>
119119
<?php if (!$block->isRedirectToCartEnabled()) : ?>
120120
<script type="text/x-magento-init">
121121
{

app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -155,24 +155,24 @@ switch ($type = $block->getType()) {
155155

156156
<?php if ($type == 'related' || $type == 'upsell'): ?>
157157
<?php if ($type == 'related'): ?>
158-
<div class="block <?php /* @escapeNotVerified */ echo $class; ?>" data-mage-init='{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}' data-limit="<?php /* @escapeNotVerified */ echo $limit; ?>" data-shuffle="<?php /* @escapeNotVerified */ echo $shuffle; ?>">
158+
<div class="block <?= /* @escapeNotVerified */ $class ?>" data-mage-init='{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}' data-limit="<?= /* @escapeNotVerified */ $limit ?>" data-shuffle="<?= /* @escapeNotVerified */ $shuffle ?>">
159159
<?php else: ?>
160-
<div class="block <?php /* @escapeNotVerified */ echo $class; ?>" data-mage-init='{"upsellProducts":{}}' data-limit="<?php /* @escapeNotVerified */ echo $limit; ?>" data-shuffle="<?php /* @escapeNotVerified */ echo $shuffle; ?>">
160+
<div class="block <?= /* @escapeNotVerified */ $class ?>" data-mage-init='{"upsellProducts":{}}' data-limit="<?= /* @escapeNotVerified */ $limit ?>" data-shuffle="<?= /* @escapeNotVerified */ $shuffle ?>">
161161
<?php endif; ?>
162162
<?php else: ?>
163-
<div class="block <?php /* @escapeNotVerified */ echo $class; ?>">
163+
<div class="block <?= /* @escapeNotVerified */ $class ?>">
164164
<?php endif; ?>
165165
<div class="block-title title">
166-
<strong id="block-<?php /* @escapeNotVerified */ echo $class?>-heading" role="heading" aria-level="2"><?php /* @escapeNotVerified */ echo $title; ?></strong>
166+
<strong id="block-<?= /* @escapeNotVerified */ $class ?>-heading" role="heading" aria-level="2"><?= /* @escapeNotVerified */ $title ?></strong>
167167
</div>
168-
<div class="block-content content" aria-labelledby="block-<?php /* @escapeNotVerified */ echo $class?>-heading">
168+
<div class="block-content content" aria-labelledby="block-<?= /* @escapeNotVerified */ $class ?>-heading">
169169
<?php if ($type == 'related' && $canItemsAddToCart): ?>
170170
<div class="block-actions">
171-
<?php /* @escapeNotVerified */ echo __('Check items to add to the cart or') ?>
172-
<button type="button" class="action select" role="select-all"><span><?php /* @escapeNotVerified */ echo __('select all') ?></span></button>
171+
<?= /* @escapeNotVerified */ __('Check items to add to the cart or') ?>
172+
<button type="button" class="action select" role="select-all"><span><?= /* @escapeNotVerified */ __('select all') ?></span></button>
173173
</div>
174174
<?php endif; ?>
175-
<div class="products wrapper grid products-grid products-<?php /* @escapeNotVerified */ echo $type; ?>">
175+
<div class="products wrapper grid products-grid products-<?= /* @escapeNotVerified */ $type ?>">
176176
<ol class="products list items product-items">
177177
<?php foreach ($items as $_item): ?>
178178
<?php $available = ''; ?>
@@ -186,27 +186,27 @@ switch ($type = $block->getType()) {
186186
<?php else: ?>
187187
<li class="item product product-item">
188188
<?php endif; ?>
189-
<div class="product-item-info <?php /* @escapeNotVerified */ echo $available; ?>">
190-
<?php /* @escapeNotVerified */ echo '<!-- ' . $image . '-->' ?>
191-
<a href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($_item) ?>" class="product photo product-item-photo">
192-
<?php echo $block->getImage($_item, $image)->toHtml(); ?>
189+
<div class="product-item-info <?= /* @escapeNotVerified */ $available ?>">
190+
<?= /* @escapeNotVerified */ '<!-- ' . $image . '-->' ?>
191+
<a href="<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>" class="product photo product-item-photo">
192+
<?= $block->getImage($_item, $image)->toHtml() ?>
193193
</a>
194194
<div class="product details product-item-details">
195-
<strong class="product name product-item-name"><a class="product-item-link" title="<?php echo $block->escapeHtml($_item->getName()) ?>" href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($_item) ?>">
196-
<?php echo $block->escapeHtml($_item->getName()) ?></a>
195+
<strong class="product name product-item-name"><a class="product-item-link" title="<?= $block->escapeHtml($_item->getName()) ?>" href="<?= /* @escapeNotVerified */ $block->getProductUrl($_item) ?>">
196+
<?= $block->escapeHtml($_item->getName()) ?></a>
197197
</strong>
198198

199-
<?php /* @escapeNotVerified */ echo $block->getProductPrice($_item); ?>
199+
<?= /* @escapeNotVerified */ $block->getProductPrice($_item) ?>
200200

201201
<?php if ($templateType): ?>
202-
<?php echo $block->getReviewsSummaryHtml($_item, $templateType) ?>
202+
<?= $block->getReviewsSummaryHtml($_item, $templateType) ?>
203203
<?php endif; ?>
204204

205205
<?php if (!$_item->isComposite() && $_item->isSaleable() && $type == 'related'): ?>
206206
<?php if (!$_item->getRequiredOptions()): ?>
207207
<div class="field choice related">
208-
<input type="checkbox" class="checkbox related" id="related-checkbox<?php /* @escapeNotVerified */ echo $_item->getId() ?>" name="related_products[]" value="<?php /* @escapeNotVerified */ echo $_item->getId() ?>" />
209-
<label class="label" for="related-checkbox<?php /* @escapeNotVerified */ echo $_item->getId() ?>"><span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span></label>
208+
<input type="checkbox" class="checkbox related" id="related-checkbox<?= /* @escapeNotVerified */ $_item->getId() ?>" name="related_products[]" value="<?= /* @escapeNotVerified */ $_item->getId() ?>" />
209+
<label class="label" for="related-checkbox<?= /* @escapeNotVerified */ $_item->getId() ?>"><span><?= /* @escapeNotVerified */ __('Add to Cart') ?></span></label>
210210
</div>
211211
<?php endif; ?>
212212
<?php endif; ?>
@@ -217,24 +217,24 @@ switch ($type = $block->getType()) {
217217
<div class="actions-primary">
218218
<?php if ($_item->isSaleable()): ?>
219219
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
220-
<button class="action tocart primary" data-mage-init='{"redirectUrl": {"url": "<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_item) ?>"}}' type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
221-
<span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
220+
<button class="action tocart primary" data-mage-init='{"redirectUrl": {"url": "<?= /* @escapeNotVerified */ $block->getAddToCartUrl($_item) ?>"}}' type="button" title="<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
221+
<span><?= /* @escapeNotVerified */ __('Add to Cart') ?></span>
222222
</button>
223223
<?php else: ?>
224224
<?php $postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper');
225225
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
226226
?>
227227
<button class="action tocart primary"
228-
data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'
229-
type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
230-
<span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
228+
data-post='<?= /* @escapeNotVerified */ $postData ?>'
229+
type="button" title="<?= /* @escapeNotVerified */ __('Add to Cart') ?>">
230+
<span><?= /* @escapeNotVerified */ __('Add to Cart') ?></span>
231231
</button>
232232
<?php endif; ?>
233233
<?php else: ?>
234234
<?php if ($_item->getIsSalable()): ?>
235-
<div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div>
235+
<div class="stock available"><span><?= /* @escapeNotVerified */ __('In stock') ?></span></div>
236236
<?php else: ?>
237-
<div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div>
237+
<div class="stock unavailable"><span><?= /* @escapeNotVerified */ __('Out of stock') ?></span></div>
238238
<?php endif; ?>
239239
<?php endif; ?>
240240
</div>
@@ -243,7 +243,7 @@ switch ($type = $block->getType()) {
243243
<?php if ($showAddTo): ?>
244244
<div class="secondary-addto-links actions-secondary" data-role="add-to-links">
245245
<?php if ($addToBlock = $block->getChildBlock('addto')): ?>
246-
<?php echo $addToBlock->setProduct($_item)->getChildHtml(); ?>
246+
<?= $addToBlock->setProduct($_item)->getChildHtml() ?>
247247
<?php endif; ?>
248248
</div>
249249
<?php endif; ?>

0 commit comments

Comments
 (0)