<?php
/**
 * Factory for Generic Tag Set
 *
 * @author Vincent van Waasbergen <v.vanwaasbergen@visualmedia.nl>
 */
namespace VisualM\TagManagerBundle\Model\TagSet;

use Exception;

use Symfony\Component\Translation\TranslatorInterface;

use VisualM\TagManagerBundle\Form\Type\GenericTagSetType;

/**
 * Factory for Generic Tag Set
 *
 * @author Vincent van Waasbergen <v.vanwaasbergen@visualmedia.nl>
 */
class GenericTagSetFactory implements MetaTagSetFactoryInterface
{
    protected $translator;

    /**
     * Constructor
     *
     * @param TranslatorInterface $translator
     */
    function __construct(TranslatorInterface $translator)
    {
        $this->translator = $translator;
    }

    /**
     * {@inheritdoc}
     */
    public function getFormType()
    {
        return GenericTagSetType::class;
    }

    /**
     * {@inheritdoc}
     */
    public function getFormView()
    {
       return null;
    }

    /**
     * {@inheritdoc}
     */
    public function getTitle()
    {
        return $this->translator->trans('tags.generic', [], 'backend');
    }

    /**
     * {@inheritdoc}
     */
    public function processMetaTag($meta_tag)
    {
        return $meta_tag;
    }
}
