<?php


namespace App\Controller;

use App\Container\CollectifData\CollectifDataContainer;
use App\Container\Site\BlockContainer;

trait ControllerTrait
{
    public static function getSubscribedServices()
    {
        return array_merge(
            parent::getSubscribedServices(),
            [
                CollectifDataContainer::class => CollectifDataContainer::class,
                BlockContainer::class => BlockContainer::class,
            ]
        );
    }

    public function getCollectifDataContainer(): CollectifDataContainer
    {
        return $this->get(CollectifDataContainer::class);
    }

    public function getBlockContainer(): BlockContainer
    {
        return $this->get(BlockContainer::class);
    }
}