<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * @var $block \Magento\Theme\Block\Html\Title
 */
$cssClass = $block->getCssClass() ? ' ' . $block->getCssClass() : '';
$title = '';
if (trim($block->getPageTitle())) {
    $title = '<span class="base" data-ui-id="page-title-wrapper" ' .  $block->getAddBaseAttribute() . '>'
        . $block->escapeHtml($block->getPageTitle()) . '</span>';
}
?>
<?php if ($title): ?>
<div class="page-title-wrapper<?php echo $cssClass; ?>">
    <div class="container">
        <h1 class="page-title"
            <?php if ($block->getId()): ?> id="<?php echo $block->getId();?>" <?php endif; ?>
            <?php if ($block->getAddBaseAttributeAria()): ?>
                aria-labelledby="<?php echo $block->getAddBaseAttributeAria(); ?>"
            <?php endif; ?>>
            <?php echo $title ?>
        </h1>
        <?php echo $block->getChildHtml(); ?>
    </div>
</div>
<?php endif; ?>
