Office.class.php 803 Bytes
<?php

namespace SH\Entities;


class Office extends \Cpeople\Classes\Block\Object
{
    use \Sh\Traits\FunctionName;
    use \Cpeople\Traits\MapConnection;

    function getText()
    {
        $result = $this->{'~PREVIEW_TEXT'};
        if($result) $result = '<p>' . implode('</p><p>', array_filter(explode("\n", $this->{'~PREVIEW_TEXT'}))) . '</p>';
        return $result;
    }

    function getPhones()
    {
        return $this->getPropValue('PHONE');
    }

    function getTime()
    {
        return $this->getPropValue('TIME');
    }

    function getAddress()
    {
        return $this->getPropValue('ADDRESS');
    }

    function getSubtitle()
    {
        return $this->getPropValue('SUBTITLE');
    }

    function getEmail()
    {
        return $this->getPropValue('EMAIL');
    }
}