public function __construct($listing, User $owner, IListingDescriptionControlFactory $listingDescriptionFactory, ListingFormFactory $listingFormFactory, ListingsFacade $listingFacade)
 {
     parent::__construct();
     if (!($listing instanceof Listing or $listing == null)) {
         throw new InvalidArgumentException();
     }
     $this->listing = $listing;
     $this->listingDescriptionFactory = $listingDescriptionFactory;
     $this->listingFormFactory = $listingFormFactory;
     $this->listingFacade = $listingFacade;
     $this->owner = $owner;
 }
 protected function createTemplate()
 {
     $template = parent::createTemplate();
     $template->addFilter('texy', function ($text) {
         $texy = new \Texy();
         $texy->setOutputMode(\Texy::HTML4_TRANSITIONAL);
         $texy->encoding = 'utf-8';
         $texy->allowedTags = array('strong' => \Texy::NONE, 'b' => \Texy::NONE, 'a' => array('href'), 'em' => \Texy::NONE, 'p' => \Texy::NONE);
         //$texy->allowedTags = \Texy::NONE;
         return $texy->process($text);
     });
     return $template;
 }