<?php
/**
 * Created by PhpStorm.
 * User: radko
 * Date: 15.11.18
 * Time: 14:40
 */

namespace Seka\Vzdelavanie\Composers;

use Seka\Vzdelavanie\Services\KategoriaServiceInterface;

/**
 * Class ZoznamKategoriiComposer
 * @package Seka\Vzdelavanie\Composers
 */
class ZoznamKategoriiComposer
{
    /**
     * @var \Seka\Vzdelavanie\Services\KategoriaServiceInterface
     */
    private $service;

    /**
     * ZoznamKategoriiComposer constructor.
     * @param \Seka\Vzdelavanie\Services\KategoriaServiceInterface $service
     */
    public function __construct(KategoriaServiceInterface $service)
    {
        $this->service = $service;
    }

    /**
     * @param $view
     */
    public function compose($view)
    {
        $view->kategorie = $this->service->vratVsetky();
    }
}
