Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert long form tags with echo to use short-echo tags #1563

Merged
merged 8 commits into from
Jun 30, 2017
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"autoOpen": true,
"buttons": false,
"modalClass": "modal-system-messages",
"title": "<?php /* @escapeNotVerified */ echo $block->getHeaderText(); ?>"
"title": "<?= /* @escapeNotVerified */ $block->getHeaderText() ?>"
}
}'>
<li class="message message-warning warning">
<?php /* @escapeNotVerified */ echo $block->getNoticeMessageText(); ?><br/>
<a href="<?php /* @escapeNotVerified */ echo $block->getNoticeMessageUrl(); ?>"><?php /* @escapeNotVerified */ echo $block->getReadDetailsText(); ?></a>
<?= /* @escapeNotVerified */ $block->getNoticeMessageText() ?><br/>
<a href="<?= /* @escapeNotVerified */ $block->getNoticeMessageUrl() ?>"><?= /* @escapeNotVerified */ $block->getReadDetailsText() ?></a>
</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@
<?php if ($lastCritical): ?>
<ul class="message-system-list">
<li class="message message-warning error">
<?php /* @escapeNotVerified */ echo $lastCritical->getText();?>
<?= /* @escapeNotVerified */ $lastCritical->getText() ?>
</li>
</ul>
<?php endif; ?>
<div class="message-system-short">
<span class="message-system-short-label">
<?php /* @escapeNotVerified */ echo __('System Messages:')?>
<?= /* @escapeNotVerified */ __('System Messages:') ?>
</span>

<?php if ($block->getCriticalCount()): ?>
<div class="message message-warning error">
<a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Critical System Messages'));?>">
<?php /* @escapeNotVerified */ echo $block->getCriticalCount();?>
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
<?= /* @escapeNotVerified */ $block->getCriticalCount() ?>
</a>
</div>
<?php endif;?>

<?php if ($block->getMajorCount()): ?>
<div class="message message-warning warning">
<a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Major System Messages'));?>">
<?php /* @escapeNotVerified */ echo $block->getMajorCount();?>
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
<?= /* @escapeNotVerified */ $block->getMajorCount() ?>
</a>
</div>
<?php endif;?>
</div>
<div id="message-system-all" title="<?php echo $block->escapeHtml(__('System messages'));?>" data-mage-init='<?php echo $block->escapeHtml($block->getSystemMessageDialogJson());?>'></div>
<div id="message-system-all" title="<?= $block->escapeHtml(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
?>
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?>

<div style="display:none" id="system_messages_list" data-role="system_messages_list" title="<?php echo $block->escapeHtml($block->getPopupTitle()); ?>">
<div style="display:none" id="system_messages_list" data-role="system_messages_list" title="<?= $block->escapeHtml($block->getPopupTitle()) ?>">
<ul class="message-system-list messages">
<?php foreach ($block->getUnreadMessages() as $message): ?>
<li class="message message-warning <?php /* @escapeNotVerified */ echo $block->getItemClass($message);?>">
<?php /* @escapeNotVerified */ echo $message->getText();?>
<li class="message message-warning <?= /* @escapeNotVerified */ $block->getItemClass($message) ?>">
<?= /* @escapeNotVerified */ $message->getText() ?>
</li>
<?php endforeach;?>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,70 +15,70 @@
<div
data-mage-init='{"toolbarEntry": {}}'
class="notifications-wrapper admin__action-dropdown-wrap"
data-notification-count="<?php /* @escapeNotVerified */ echo $notificationCount; ?>">
data-notification-count="<?= /* @escapeNotVerified */ $notificationCount ?>">
<?php if ($notificationCount > 0) : ?>
<a
href="<?php /* @escapeNotVerified */ echo $block->getUrl('adminhtml/notification/index'); ?>"
href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/index') ?>"
class="notifications-action admin__action-dropdown"
data-mage-init='{"dropdown":{}}'
title="<?php /* @escapeNotVerified */ echo __('Notifications'); ?>"
title="<?= /* @escapeNotVerified */ __('Notifications') ?>"
data-toggle="dropdown">
<span class="notifications-counter">
<?php /* @escapeNotVerified */ echo ($notificationCount > $notificationCounterMax) ? $notificationCounterMax . '+' : $notificationCount; ?>
<?= /* @escapeNotVerified */ ($notificationCount > $notificationCounterMax) ? $notificationCounterMax . '+' : $notificationCount ?>
</span>
</a>
<ul
class="admin__action-dropdown-menu"
data-mark-as-read-url="<?php /* @escapeNotVerified */ echo $block->getUrl('adminhtml/notification/ajaxMarkAsRead'); ?>">
data-mark-as-read-url="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/ajaxMarkAsRead') ?>">
<?php foreach ($block->getLatestUnreadNotifications() as $notification) : ?>
<?php /** @var $notification \Magento\AdminNotification\Model\Inbox*/ ?>
<li class="notifications-entry<?php if ($notification->getSeverity() == 1): ?> notifications-critical<?php endif; ?>"
data-notification-id="<?php /* @escapeNotVerified */ echo $notification->getId(); ?>"
data-notification-id="<?= /* @escapeNotVerified */ $notification->getId() ?>"
data-notification-severity="<?php if ($notification->getSeverity() == 1): ?>1<?php endif; ?>">
<?php
$notificationDescription = $block->escapeHtml($notification->getDescription());
$notificationDescriptionLength = $block->getNotificationDescriptionLength();
?>
<strong class="notifications-entry-title">
<?php echo $block->escapeHtml($notification->getTitle()); ?>
<?= $block->escapeHtml($notification->getTitle()) ?>
</strong>
<?php if (strlen($notificationDescription) > $notificationDescriptionLength) : ?>
<p class="notifications-entry-description _cutted">
<span class="notifications-entry-description-start">
<?php /* @escapeNotVerified */ echo substr($notificationDescription, 0, $notificationDescriptionLength); ?>
<?= /* @escapeNotVerified */ substr($notificationDescription, 0, $notificationDescriptionLength) ?>
</span>
<span class="notifications-entry-description-end">
<?php /* @escapeNotVerified */ echo substr($notificationDescription, $notificationDescriptionLength); ?>
<?= /* @escapeNotVerified */ substr($notificationDescription, $notificationDescriptionLength) ?>
</span>
</p>
<?php else : ?>
<p class="notifications-entry-description">
<?php /* @escapeNotVerified */ echo $notificationDescription; ?>
<?= /* @escapeNotVerified */ $notificationDescription ?>
</p>
<?php endif; ?>
<time class="notifications-entry-time">
<?php /* @escapeNotVerified */ echo $block->formatNotificationDate($notification->getDateAdded()); ?>
<?= /* @escapeNotVerified */ $block->formatNotificationDate($notification->getDateAdded()) ?>
</time>
<button
type="button"
class="notifications-close"
title="<?php /* @escapeNotVerified */ echo __('Close'); ?>"
title="<?= /* @escapeNotVerified */ __('Close') ?>"
></button>
</li>
<?php endforeach; ?>
<li class="notifications-entry notifications-entry-last">
<a
href="<?php /* @escapeNotVerified */ echo $block->getUrl('adminhtml/notification/index'); ?>"
href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/index') ?>"
class="action-tertiary action-more">
<?php /* @escapeNotVerified */ echo __('See All (') ?><span class="notifications-counter"><?php /* @escapeNotVerified */ echo $notificationCount ?></span><?php /* @escapeNotVerified */ echo __(' unread)'); ?>
<?= /* @escapeNotVerified */ __('See All (') ?><span class="notifications-counter"><?= /* @escapeNotVerified */ $notificationCount ?></span><?= /* @escapeNotVerified */ __(' unread)') ?>
</a>
</li>
</ul>
<?php else : ?>
<a
class="notifications-action admin__action-dropdown"
href="<?php /* @escapeNotVerified */ echo $block->getUrl('adminhtml/notification/index'); ?>"
title="<?php /* @escapeNotVerified */ echo __('Notifications'); ?>">
href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/index') ?>"
title="<?= /* @escapeNotVerified */ __('Notifications') ?>">
</a>
<?php endif; ?>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
<section class="dashboard-advanced-reports" data-index="dashboard-advanced-reports">
<div class="dashboard-advanced-reports-description">
<header class="dashboard-advanced-reports-title">
<?php echo $block->escapeHtml(__('Advanced Reporting')) ?>
<?= $block->escapeHtml(__('Advanced Reporting')) ?>
</header>
<div class="dashboard-advanced-reports-content">
<?php echo $block->escapeHtml(__('Gain new insights and take command of your business\' performance,' .
<?= $block->escapeHtml(__('Gain new insights and take command of your business\' performance,' .
' using our dynamic product, order, and customer reports tailored to your customer data.')) ?>
<a href="<?php echo $block->escapeUrl($block->getUrl('analytics/reports/show')); ?>"
<a href="<?= $block->escapeUrl($block->getUrl('analytics/reports/show')) ?>"
target="_blank"
data-index="analytics-service-info-link">
<?php echo $block->escapeHtml(__('View details')) ?>
<?= $block->escapeHtml(__('View details')) ?>
</a>
</div>
</div>
<div class="dashboard-advanced-reports-actions">
<a href="<?php echo $block->escapeUrl($block->getUrl('analytics/reports/show')); ?>"
<a href="<?= $block->escapeUrl($block->getUrl('analytics/reports/show')) ?>"
target="_blank"
class="action action-advanced-reports"
data-index="analytics-service-link"
title="<?php echo $block->escapeHtmlAttr(__('Go to Advanced Reporting')) ?>">
<span><?php echo $block->escapeHtml(__('Go to Advanced Reporting')) ?></span>
title="<?= $block->escapeHtmlAttr(__('Go to Advanced Reporting')) ?>">
<span><?= $block->escapeHtml(__('Go to Advanced Reporting')) ?></span>
</a>
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ $helper = $block->getHelper('adminhtml');
<head>
<script>
<?php if (isset($params['redirect'])): ?>
window.location="<?php echo $block->escapeUrl($params['redirect']); ?>";
window.location="<?= $block->escapeUrl($params['redirect']) ?>";
<?php endif; ?>
<?php if (isset($params['redirect_parent'])): ?>
window.top.location="<?php echo $block->escapeUrl($params['redirect_parent']); ?>";
window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
<?php endif; ?>
<?php if (isset($params['error_msg'])): ?>
window.top.directPostModel.showError(<?php /* @noEscape */ echo json_encode((array)$params['error_msg']); ?>);
window.top.directPostModel.showError(<?= /* @noEscape */ json_encode((array)$params['error_msg']) ?>);
<?php if (isset($params['x_invoice_num'])): ?>
window.top.directPostModel.successUrl="<?php echo $block->escapeUrl($helper->getSuccessOrderUrl($params)); ?>";
window.top.directPostModel.successUrl="<?= $block->escapeUrl($helper->getSuccessOrderUrl($params)) ?>";
<?php endif; ?>
<?php endif; ?>
</script>
Expand Down
Loading