<?php

namespace KupShop\GTMOldBundle\PageType;

use KupShop\KupShopBundle\Views\View;

abstract class AbstractPageType
{
    /** @var View */
    protected $view;

    /**
     * Collect data over getPageData() method.
     */
    public function collectData(&$dataContainer)
    {
        $this->getPageData($dataContainer);
        $this->getPageType($dataContainer);
        $this->getTagParamsData($dataContainer);
    }

    /**
     * Specific PageData.
     */
    abstract public function getPageData(&$dataContainer);

    /**
     * Page type must be defined on every PageType.
     */
    abstract public function getPageType(&$dataContainer);

    /**
     * TagParams data must be defined on every PageType.
     */
    abstract public function getTagParamsData(&$dataContainer);

    public function setView(&$view)
    {
        $this->view = $view;
    }

    protected function addAdditionalFields(&$container, $object)
    {
    }
}
