FrontController.php 523 Bytes
Newer Older
Julien Jorry committed
1 2 3 4 5 6 7 8 9
<?php

namespace App\Controller;

use App\Entity\GlobalParameter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class FrontController extends AbstractController
{
10 11 12 13 14
    /**
     * If the global parameter USE_WORDPRESS is set to false, then the front is activated.
     *
     * @return The value of the parameter USE_WORDPRESS
     */
Julien Jorry committed
15 16
    protected function isFrontActivated()
    {
17
        return 'false' == $this->em->getRepository(GlobalParameter::class)->val(GlobalParameter::USE_WORDPRESS);
Julien Jorry committed
18 19
    }
}