<?php

namespace Backend\BaseBundle\Model;

use Backend\BaseBundle\Model\om\BaseSite;

class Site extends BaseSite
{
    public function canLoginBackend()
    {
        return !$this->getLocked();
    }

    public function isAPIEnabled()
    {
        return $this->getEnabled() || ($this->getExpiredAt('U') < time() && $this->getExpiredAt() != null);
    }
}
