<?php $agency = $this->agency ?>



<div itemscope itemtype="https://schema.org/RealEstateAgent">

    <meta itemprop="name" content="<?= $agency->getName() ?>" />

    <meta itemprop="image" content="http://www.realadvice.be<?=$agency->getLogoUrl() ?>" />

    <meta itemprop="url" content="<?=$agency->getWebsite() ?>" />



    <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">

        <meta itemprop="streetAddress" content="<?=$agency->getAddress() ?>" />

        <meta itemprop="postalCode" content="<?=$agency->getCp() ?>" />

        <meta itemprop="addressLocality" content="<?=$agency->getCity() ?>" />

    </div>

    <meta itemprop="email" content="<?=$agency->getEmail() ?>" />

    <meta itemprop="logo" content="http://www.realadvice.be<?=$agency->getLogoUrl() ?>" />

    <meta itemprop="telephone" content="<?=$agency->getPhone() ?>" />

    <meta itemprop="url" content="<?=$agency->getWebsite() ?>" />



    <div  itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">

        <meta itemprop="ratingValue" content="<?= $agency->getNps() ?>" />

        <meta itemprop="bestRating" content="10" />

        <meta itemprop="worstRating" content="0" />

        <meta itemprop="ratingCount" content="<?= count($this->comments) ?>"/>

    </div>



    <?php foreach($agency->getComments() as $c) { ?>

    <span itemprop="review" itemscope itemtype="http://schema.org/Review">

        <span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">

            <meta itemprop="ratingValue" content="<?= $c->getQuote() ?>" />

            <meta itemprop="bestRating" content="10" />

            <meta itemprop="worstRating" content="0" />

        </span>

        <span itemprop="author" itemscope itemtype="http://schema.org/Person">

          <meta itemprop="name" content="RealAdvice" />

        </span>



        <meta itemprop="datePublished" content="<?= Date('Y-m-d', $c->getDate()) ?>">

        <meta itemprop="reviewBody" content="<?= $c->getText() ?>" />

        <span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">

            <meta itemprop="name" content="RealAdvice">

        </span>

    </span>

    <?php }?>

</div>