deblan.tv/vendor/trinity/src/Trinity/Bundle/NewsletterBundle/Model/DefaultModel.php

55 lines
1.5 KiB
PHP
Raw Normal View History

2015-03-02 21:57:49 +01:00
<?php
namespace Trinity\Bundle\NewsletterBundle\Model;
use Trinity\Bundle\NewsletterBundle\Model\Block;
class DefaultModel extends Model
{
public function __construct($template = null)
{
parent::__construct(null !== $template ? $template : 'TrinityNewsletterBundle:Default:index.html.twig');
}
public function getConfiguration()
{
return $this->configuration
->setBlock('title', 'Trinity\Bundle\NewsletterBundle\Form\Type\BlockType')
->setBlock('subtitle', 'Trinity\Bundle\NewsletterBundle\Form\Type\BlockType')
->setBlock('content1', 'Trinity\Bundle\NewsletterBundle\Form\Type\TinymceAdvancedBlockType')
->setBlock('content2', 'Trinity\Bundle\NewsletterBundle\Form\Type\TinymceAdvancedBlockType')
->setBlock('content3', 'Trinity\Bundle\NewsletterBundle\Form\Type\TinymceAdvancedBlockType')
;
}
public function getBlockContent1()
{
return $this->getBlock('content1');
}
public function setBlockContent1(Block $block)
{
return $this->setBlock($block);
}
public function getBlockContent2()
{
return $this->getBlock('content2');
}
public function setBlockContent2(Block $block)
{
return $this->setBlock($block);
}
public function getBlockContent3()
{
return $this->getBlock('content3');
}
public function setBlockContent3(Block $block)
{
return $this->setBlock($block);
}
}