diff --git a/src/KekRozsak/FrontBundle/Controller/DocumentController.php b/src/KekRozsak/FrontBundle/Controller/DocumentController.php
index 48ac6c0..ed543f2 100644
--- a/src/KekRozsak/FrontBundle/Controller/DocumentController.php
+++ b/src/KekRozsak/FrontBundle/Controller/DocumentController.php
@@ -6,13 +6,17 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
+use KekRozsak\FrontBundle\Entity\Document;
+use KekRozsak\FrontBundle\Form\Type\DocumentType;
+use KekRozsak\FrontBundle\Extensions\Slugifier;
+
class DocumentController extends Controller
{
/**
* @Route("/dokumentum/{documentSlug}", name="KekRozsakFrontBundle_documentView")
* @Template()
*/
- public function documentViewAction($documentSlug)
+ public function viewAction($documentSlug)
{
$docRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Document');
if (!($document = $docRepo->findOneBySlug($documentSlug)))
@@ -22,4 +26,86 @@ class DocumentController extends Controller
'document' => $document,
);
}
+
+ /**
+ * @Route("/dokumentumok/uj/{groupSlug}", name="KekRozsakFrontBundle_documentCreate", defaults={"groupslug"=""})
+ * @Template()
+ */
+ public function createAction($groupSlug = '')
+ {
+ $groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
+ $group = $groupRepo->findOneBySlug($groupSlug);
+ /* TODO: make group fully optional */
+
+ $document = new Document();
+ $document->setSlug('n-a');
+ $form = $this->createForm(new DocumentType(), $document);
+ $request = $this->getRequest();
+
+ if ($request->getMethod() == 'POST')
+ {
+ $form->bindRequest($request);
+
+ if ($form->isValid())
+ {
+ $slugifier = new Slugifier();
+ $document->setSlug($slugifier->slugify($document->getTitle()));
+ $document->setCreatedAt(new \DateTime('now'));
+ $document->setCreatedBy($this->get('security.context')->getToken()->getUser());
+
+ if ($group)
+ {
+ $group->addDocument($document);
+ $document->addGroup($group);
+ }
+
+ $em = $this->getDoctrine()->getEntityManager();
+ $em->persist($document);
+ $em->flush();
+
+ /* TODO: return to group list if groupSlug is empty! */
+ return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupDocuments', array('groupSlug' => $group->getSlug())));
+ }
+ }
+
+ return array(
+ 'defaultGroup' => $groupSlug,
+ 'form' => $form->createView(),
+ );
+ }
+
+ /**
+ * @Route("/dokumentum/{documentSlug}/szerkesztes", name="KekRozsakFrontBundle_documentEdit")
+ * @Template()
+ */
+ public function editAction($documentSlug)
+ {
+ $documentRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Document');
+ if (!($document = $documentRepo->findOneBySlug($documentSlug)))
+ throw $this->createNotFoundException('A kért dokumentum nem létezik!');
+ $form = $this->createForm(new DocumentType(), $document);
+ $request = $this->getRequest();
+
+ if ($request->getMethod() == 'POST')
+ {
+ $form->bindRequest($request);
+ if ($form->isValid())
+ {
+ $slugifier = new Slugifier();
+ $document->setSlug($slugifier->slugify($document->getTitle()));
+ // TODO: add updatedAt, updatedBy, updateReason, etc.
+
+ $em = $this->getDoctrine()->getEntityManager();
+ $em->persist($document);
+ $em->flush();
+
+ return $this->redirect($this->generateUrl('KekRozsakFrontBundle_documentView', array('documentSlug' => $document->getSlug())));
+ }
+ }
+
+ return array(
+ 'document' => $document,
+ 'form' => $form->createView(),
+ );
+ }
}
diff --git a/src/KekRozsak/FrontBundle/Entity/Document.php b/src/KekRozsak/FrontBundle/Entity/Document.php
index fc7905e..9026d3b 100644
--- a/src/KekRozsak/FrontBundle/Entity/Document.php
+++ b/src/KekRozsak/FrontBundle/Entity/Document.php
@@ -4,6 +4,8 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Validator\Constraints as Assert;
+use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
use KekRozsak\SecurityBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\Group;
@@ -12,6 +14,8 @@ use KekRozsak\FrontBundle\Entity\Group;
* KekRozsak\FrontBundle\Entity\Document
* @ORM\Entity
* @ORM\Table(name="documents")
+ * @DoctrineAssert\UniqueEntity(fields={"title"}, message="Ilyen című dokumentum már létezik. Kérlek válassz másikat!")
+ * @DoctrineAssert\UniqueEntity(fields={"slug"}, message="Ilyen című dokumentum már létezik. Kérlek válassz másikat!")
*/
class Document
{
@@ -41,6 +45,7 @@ class Document
/**
* @var string $title
* @ORM\Column(type="string", length=150, unique=true, nullable=false)
+ * @Assert\NotBlank()
*/
protected $title;
@@ -69,6 +74,7 @@ class Document
/**
* @var string $slug
* @ORM\Column(type="string", length=150, unique=true, nullable=false)
+ * @Assert\NotBlank()
*/
protected $slug;
@@ -207,4 +213,88 @@ class Document
{
return $this->group;
}
+
+ /**
+ * @var KekRozsak\SecurityBundle\Entity\User $updatedBy
+ * @ORM\ManyToOne(targetEntity="KekRozsak\SecurityBundle\Entity\User")
+ */
+ protected $updatedBy;
+
+ /**
+ * Set updatedBy
+ *
+ * @param KekRozsak\SecurityBundle\Entity\User $updatedBy
+ * @return Document
+ */
+ public function setUpdatedBy(\KekRozsak\SecurityBundle\Entity\User $updatedBy = null)
+ {
+ $this->updatedBy = $updatedBy;
+ return $this;
+ }
+
+ /**
+ * Get updatedBy
+ *
+ * @return KekRozsak\SecurityBundle\Entity\User
+ */
+ public function getUpdatedBy()
+ {
+ return $this->updatedBy;
+ }
+
+ /**
+ * @var DateTime $updatedAt
+ * @ORM\Column(type="datetime", nullable=true)
+ */
+ protected $updatedAt;
+
+ /**
+ * Set updatedAt
+ *
+ * @param DateTime $updatedAt
+ * @return Document
+ */
+ public function setUpdatedAt(\DateTime $updatedAt = null)
+ {
+ $this->updatedAt = $updatedAt;
+ return $this;
+ }
+
+ /**
+ * Get updatedAt
+ *
+ * @return DateTime
+ */
+ public function getUpdatedAt()
+ {
+ return $this->updatedAt;
+ }
+
+ /**
+ * @var string updateReason
+ * @ORM\Column(type="text", nullable=true)
+ */
+ protected $updateReason;
+
+ /**
+ * Set updateReason
+ *
+ * @param string $updateReason
+ * @return Document
+ */
+ public function setUpdateReason($updateReason = null)
+ {
+ $this->updateReason = $updateReason;
+ return $this;
+ }
+
+ /**
+ * Get updateReason
+ *
+ * @return string
+ */
+ public function getUpdateReason()
+ {
+ return $this->updateReason;
+ }
}
diff --git a/src/KekRozsak/FrontBundle/Form/Type/DocumentType.php b/src/KekRozsak/FrontBundle/Form/Type/DocumentType.php
new file mode 100644
index 0000000..d7c3068
--- /dev/null
+++ b/src/KekRozsak/FrontBundle/Form/Type/DocumentType.php
@@ -0,0 +1,27 @@
+add('title', null, array(
+ 'label' => 'A dokumentum címe',
+ ));
+
+ $builder->add('content', 'ckeditor', array(
+ 'label' => ' ',
+ ));
+
+ /* TODO: possibility to add to other groups! */
+ }
+
+ public function getName()
+ {
+ return 'document';
+ }
+}
diff --git a/src/KekRozsak/FrontBundle/Resources/views/Document/create.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Document/create.html.twig
new file mode 100644
index 0000000..52299ff
--- /dev/null
+++ b/src/KekRozsak/FrontBundle/Resources/views/Document/create.html.twig
@@ -0,0 +1,9 @@
+{% extends '::main_template.html.twig' %}
+{% block title %} - Dokumentum létrehozása{% endblock %}
+{% block content %}
+
Új dokumentum létrehozása
+
+{% endblock content %}
diff --git a/src/KekRozsak/FrontBundle/Resources/views/Document/documentView.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Document/documentView.html.twig
deleted file mode 100644
index a162a2d..0000000
--- a/src/KekRozsak/FrontBundle/Resources/views/Document/documentView.html.twig
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends '::main_template.html.twig' %}
-{% block title %} - Dokumentum - {{ document.title }}{% endblock %}
-{% block content %}
-{{ document.title }}
-{{ document.content }}
-{{ document.createdBy.displayName }}
-{% endblock content %}
diff --git a/src/KekRozsak/FrontBundle/Resources/views/Document/edit.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Document/edit.html.twig
new file mode 100644
index 0000000..895bb5c
--- /dev/null
+++ b/src/KekRozsak/FrontBundle/Resources/views/Document/edit.html.twig
@@ -0,0 +1,9 @@
+{% extends '::main_template.html.twig' %}
+{% block title %} - Dokumentum szerkesztése - {{ document.title }}{% endblock %}
+{% block content %}
+Dokumentum szerkesztése - {{ document.title }}
+
+{% endblock content %}
diff --git a/src/KekRozsak/FrontBundle/Resources/views/Document/view.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Document/view.html.twig
new file mode 100644
index 0000000..dcac593
--- /dev/null
+++ b/src/KekRozsak/FrontBundle/Resources/views/Document/view.html.twig
@@ -0,0 +1,9 @@
+{% extends '::main_template.html.twig' %}
+{% block title %} - Dokumentum - {{ document.title }}{% endblock %}
+{% block content %}
+
+ {{ document.title }}{% if document.createdBy == app.user %} [ Szerkesztés ] {% endif %}
+
+{{ document.content|raw }}
+{{ document.createdBy.displayName }}
+{% endblock content %}
diff --git a/src/KekRozsak/FrontBundle/Resources/views/Group/groupDocuments.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Group/groupDocuments.html.twig
index 2b9651e..0d85ec9 100644
--- a/src/KekRozsak/FrontBundle/Resources/views/Group/groupDocuments.html.twig
+++ b/src/KekRozsak/FrontBundle/Resources/views/Group/groupDocuments.html.twig
@@ -9,9 +9,25 @@
Tagok
{{ group.name }} - Dokumentumok
-
+
+
+
+ Cím |
+ Készítette |
+
+
+
{% for document in group.documents %}
- - {{ document.title }}
+
+ [ikon] |
+ {{ document.title }} |
+
+ {{ document.createdBy.displayName }}
+ {{ document.createdAt|date('Y-m-d H:i') }}
+ |
+
{% endfor %}
-
+
+
+Új dokumentum
{% endblock %}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index dcfbf9a..bcb77dd 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -3,7 +3,7 @@
"name": "jms/metadata",
"version": "1.1.1",
"version_normalized": "1.1.1.0",
- "time": "2011-12-29 19:32:49",
+ "time": "2011-12-29 14:32:49",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/metadata",
@@ -47,7 +47,7 @@
"name": "jms/cg",
"version": "1.0.0",
"version_normalized": "1.0.0.0",
- "time": "2011-12-29 18:40:52",
+ "time": "2011-12-29 13:40:52",
"source": {
"type": "git",
"url": "git://github.com/schmittjoh/cg-library.git",
@@ -89,7 +89,7 @@
"version": "1.0.0",
"version_normalized": "1.0.0.0",
"target-dir": "JMS/AopBundle",
- "time": "2011-12-29 18:50:26",
+ "time": "2011-12-29 13:50:26",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/JMSAopBundle",
@@ -133,7 +133,7 @@
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"target-dir": "JMS/SecurityExtraBundle",
- "time": "2011-12-29 22:38:12",
+ "time": "2011-12-29 17:38:12",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/JMSSecurityExtraBundle",
@@ -178,7 +178,7 @@
"version": "1.0.1",
"version_normalized": "1.0.1.0",
"target-dir": "JMS/DiExtraBundle",
- "time": "2012-02-24 14:01:54",
+ "time": "2012-02-24 09:01:54",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/JMSDiExtraBundle",
@@ -221,7 +221,7 @@
"name": "doctrine/common",
"version": "2.2.2",
"version_normalized": "2.2.2.0",
- "time": "2012-04-06 21:46:44",
+ "time": "2012-04-06 11:46:44",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common",
@@ -287,7 +287,7 @@
"name": "monolog/monolog",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
- "time": "2012-04-17 08:27:40",
+ "time": "2012-04-16 22:27:40",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
@@ -337,7 +337,7 @@
"name": "twig/extensions",
"version": "dev-master",
"version_normalized": "9999999-dev",
- "time": "2012-05-15 15:28:19",
+ "time": "2012-05-15 05:28:19",
"source": {
"type": "git",
"url": "https://github.com/fabpot/Twig-extensions",
@@ -378,71 +378,12 @@
}
}
},
- {
- "name": "kriswallsmith/assetic",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
- "time": "2012-06-06 19:41:54",
- "source": {
- "type": "git",
- "url": "http://github.com/kriswallsmith/assetic.git",
- "reference": "d6f89a3170c5280ad554347dc113eb25fdf00ad7"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/kriswallsmith/assetic/zipball/d6f89a3170c5280ad554347dc113eb25fdf00ad7",
- "reference": "d6f89a3170c5280ad554347dc113eb25fdf00ad7",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0",
- "symfony/process": "2.1.*"
- },
- "require-dev": {
- "twig/twig": ">=1.6.0,<2.0",
- "leafo/lessphp": "*"
- },
- "suggest": {
- "twig/twig": "Assetic provides the integration with the Twig templating engine",
- "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "installation-source": "source",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Kris Wallsmith",
- "email": "kris.wallsmith@gmail.com",
- "homepage": "http://kriswallsmith.net/",
- "role": null
- }
- ],
- "description": "Asset Management for PHP",
- "homepage": "https://github.com/kriswallsmith/assetic",
- "keywords": [
- "assets",
- "compression",
- "minification"
- ],
- "autoload": {
- "psr-0": {
- "Assetic": "src/"
- }
- }
- },
{
"name": "doctrine/doctrine-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Doctrine/Bundle/DoctrineBundle",
- "time": "2012-07-02 04:42:17",
+ "time": "2012-07-01 18:42:17",
"source": {
"type": "git",
"url": "git://github.com/doctrine/DoctrineBundle.git",
@@ -516,7 +457,7 @@
"name": "doctrine/orm",
"version": "2.2.x-dev",
"version_normalized": "2.2.9999999.9999999-dev",
- "time": "2012-07-06 01:48:00",
+ "time": "2012-07-05 15:48:00",
"source": {
"type": "git",
"url": "git://github.com/doctrine/doctrine2.git",
@@ -581,7 +522,7 @@
"name": "doctrine/dbal",
"version": "2.2.x-dev",
"version_normalized": "2.2.9999999.9999999-dev",
- "time": "2012-07-07 12:30:35",
+ "time": "2012-07-07 02:30:35",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal",
@@ -647,7 +588,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/GeneratorBundle",
- "time": "2012-07-12 18:04:48",
+ "time": "2012-07-12 08:04:48",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioGeneratorBundle",
@@ -695,68 +636,12 @@
}
}
},
- {
- "name": "symfony/assetic-bundle",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
- "target-dir": "Symfony/Bundle/AsseticBundle",
- "time": "2012-07-12 00:51:17",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/AsseticBundle",
- "reference": "ed933dcfa45f00b6bc6d7727007403f3ff429e5a"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/symfony/AsseticBundle/zipball/ed933dcfa45f00b6bc6d7727007403f3ff429e5a",
- "reference": "ed933dcfa45f00b6bc6d7727007403f3ff429e5a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0",
- "symfony/framework-bundle": "2.1.*",
- "kriswallsmith/assetic": "1.1.*"
- },
- "suggest": {
- "symfony/twig-bundle": "2.1.*"
- },
- "type": "symfony-bundle",
- "extra": {
- "branch-alias": {
- "dev-master": "2.1.x-dev"
- }
- },
- "installation-source": "source",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Kris Wallsmith",
- "email": "kris.wallsmith@gmail.com",
- "homepage": "http://kriswallsmith.net/",
- "role": null
- }
- ],
- "description": "Integrates Assetic into Symfony2",
- "homepage": "https://github.com/symfony/AsseticBundle",
- "keywords": [
- "assets",
- "compression",
- "minification"
- ],
- "autoload": {
- "psr-0": {
- "Symfony\\Bundle\\AsseticBundle": ""
- }
- }
- },
{
"name": "symfony/monolog-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Symfony/Bundle/MonologBundle",
- "time": "2012-06-29 23:48:07",
+ "time": "2012-06-29 13:48:07",
"source": {
"type": "git",
"url": "https://github.com/symfony/MonologBundle",
@@ -816,7 +701,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/FrameworkExtraBundle",
- "time": "2012-07-11 17:13:52",
+ "time": "2012-07-11 07:13:52",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioFrameworkExtraBundle",
@@ -861,124 +746,11 @@
}
}
},
- {
- "name": "twig/twig",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
- "time": "2012-07-15 17:42:44",
- "source": {
- "type": "git",
- "url": "git://github.com/fabpot/Twig.git",
- "reference": "d45664045194ef62573c153c424508527105041e"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/fabpot/Twig/zipball/d45664045194ef62573c153c424508527105041e",
- "reference": "d45664045194ef62573c153c424508527105041e",
- "shasum": ""
- },
- "require": {
- "php": ">=5.2.4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.9-dev"
- }
- },
- "installation-source": "source",
- "license": [
- "BSD-3"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": null,
- "role": null
- },
- {
- "name": "Armin Ronacher",
- "email": "armin.ronacher@active-4.com",
- "homepage": null,
- "role": null
- }
- ],
- "description": "Twig, the flexible, fast, and secure template language for PHP",
- "homepage": "http://twig.sensiolabs.org",
- "keywords": [
- "templating"
- ],
- "autoload": {
- "psr-0": {
- "Twig_": "lib/"
- }
- }
- },
- {
- "name": "symfony/swiftmailer-bundle",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
- "target-dir": "Symfony/Bundle/SwiftmailerBundle",
- "time": "2012-07-05 05:33:34",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/SwiftmailerBundle",
- "reference": "v2.1.0-BETA3"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/symfony/SwiftmailerBundle/zipball/v2.1.0-BETA3",
- "reference": "v2.1.0-BETA3",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.2",
- "symfony/swiftmailer-bridge": "2.1.*",
- "swiftmailer/swiftmailer": ">=4.2.0,<4.3-dev"
- },
- "require-dev": {
- "symfony/dependency-injection": "2.1.*",
- "symfony/http-kernel": "2.1.*",
- "symfony/config": "2.1.*"
- },
- "type": "symfony-bundle",
- "extra": {
- "branch-alias": {
- "dev-master": "2.1-dev"
- }
- },
- "installation-source": "source",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": null,
- "role": null
- },
- {
- "name": "Symfony Community",
- "email": null,
- "homepage": "http://symfony.com/contributors",
- "role": null
- }
- ],
- "description": "Symfony SwiftmailerBundle",
- "homepage": "http://symfony.com",
- "autoload": {
- "psr-0": {
- "Symfony\\Bundle\\SwiftmailerBundle": ""
- }
- }
- },
{
"name": "swiftmailer/swiftmailer",
"version": "dev-master",
"version_normalized": "9999999-dev",
- "time": "2012-07-13 06:47:17",
+ "time": "2012-07-12 20:47:17",
"source": {
"type": "git",
"url": "git://github.com/swiftmailer/swiftmailer.git",
@@ -1034,7 +806,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/DistributionBundle",
- "time": "2012-07-15 04:24:10",
+ "time": "2012-07-14 18:24:10",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioDistributionBundle",
@@ -1073,12 +845,71 @@
}
}
},
+ {
+ "name": "symfony/swiftmailer-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Symfony/Bundle/SwiftmailerBundle",
+ "time": "2012-07-19 01:55:12",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/SwiftmailerBundle",
+ "reference": "65e6079443c3cd413012e146aa74307f18671f42"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/SwiftmailerBundle/zipball/65e6079443c3cd413012e146aa74307f18671f42",
+ "reference": "65e6079443c3cd413012e146aa74307f18671f42",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "symfony/swiftmailer-bridge": "2.1.*",
+ "swiftmailer/swiftmailer": ">=4.2.0,<4.3-dev"
+ },
+ "require-dev": {
+ "symfony/dependency-injection": "2.1.*",
+ "symfony/http-kernel": "2.1.*",
+ "symfony/config": "2.1.*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Symfony Community",
+ "email": null,
+ "homepage": "http://symfony.com/contributors",
+ "role": null
+ }
+ ],
+ "description": "Symfony SwiftmailerBundle",
+ "homepage": "http://symfony.com",
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Bundle\\SwiftmailerBundle": ""
+ }
+ }
+ },
{
"name": "egeloen/ckeditor-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Ivory/CKEditorBundle",
- "time": "2012-05-28 13:16:47",
+ "time": "2012-05-28 11:16:47",
"source": {
"type": "git",
"url": "https://github.com/egeloen/IvoryCKEditorBundle",
@@ -1118,19 +949,188 @@
}
},
{
- "name": "symfony/symfony",
+ "name": "kriswallsmith/assetic",
"version": "dev-master",
"version_normalized": "9999999-dev",
- "time": "2012-07-17 09:07:53",
+ "time": "2012-07-20 10:33:33",
"source": {
"type": "git",
- "url": "git://github.com/symfony/symfony.git",
- "reference": "f52ce6178243e4b11aa09bde147f684d596fb120"
+ "url": "http://github.com/kriswallsmith/assetic.git",
+ "reference": "5c1c9b658b732a980312e8f29cec4e175c2bb6b2"
},
"dist": {
"type": "zip",
- "url": "https://github.com/symfony/symfony/zipball/f52ce6178243e4b11aa09bde147f684d596fb120",
- "reference": "f52ce6178243e4b11aa09bde147f684d596fb120",
+ "url": "https://github.com/kriswallsmith/assetic/zipball/5c1c9b658b732a980312e8f29cec4e175c2bb6b2",
+ "reference": "5c1c9b658b732a980312e8f29cec4e175c2bb6b2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "symfony/process": "2.1.*"
+ },
+ "require-dev": {
+ "twig/twig": ">=1.6.0,<2.0",
+ "leafo/lessphp": "*"
+ },
+ "suggest": {
+ "twig/twig": "Assetic provides the integration with the Twig templating engine",
+ "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/",
+ "role": null
+ }
+ ],
+ "description": "Asset Management for PHP",
+ "homepage": "https://github.com/kriswallsmith/assetic",
+ "keywords": [
+ "assets",
+ "compression",
+ "minification"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Assetic": "src/"
+ }
+ }
+ },
+ {
+ "name": "symfony/assetic-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Symfony/Bundle/AsseticBundle",
+ "time": "2012-07-20 19:34:07",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/AsseticBundle",
+ "reference": "e5e9a56a872d9e1f305d14cd8296bf77888388af"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/AsseticBundle/zipball/e5e9a56a872d9e1f305d14cd8296bf77888388af",
+ "reference": "e5e9a56a872d9e1f305d14cd8296bf77888388af",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "symfony/framework-bundle": "2.1.*",
+ "kriswallsmith/assetic": "1.1.*"
+ },
+ "suggest": {
+ "symfony/twig-bundle": "2.1.*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/",
+ "role": null
+ }
+ ],
+ "description": "Integrates Assetic into Symfony2",
+ "homepage": "https://github.com/symfony/AsseticBundle",
+ "keywords": [
+ "assets",
+ "compression",
+ "minification"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Bundle\\AsseticBundle": ""
+ }
+ }
+ },
+ {
+ "name": "twig/twig",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-07-20 12:41:38",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/fabpot/Twig.git",
+ "reference": "8a84838798e45424c5fe2d87149db6855ae037bf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/fabpot/Twig/zipball/8a84838798e45424c5fe2d87149db6855ae037bf",
+ "reference": "8a84838798e45424c5fe2d87149db6855ae037bf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.9-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "BSD-3"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "http://twig.sensiolabs.org",
+ "keywords": [
+ "templating"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ }
+ }
+ },
+ {
+ "name": "symfony/symfony",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-07-21 11:16:18",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/symfony/symfony.git",
+ "reference": "6c256b01b087f94a4ec04487d875fe81375eb6c1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/symfony/zipball/6c256b01b087f94a4ec04487d875fe81375eb6c1",
+ "reference": "6c256b01b087f94a4ec04487d875fe81375eb6c1",
"shasum": ""
},
"require": {
diff --git a/vendor/kriswallsmith/assetic/.gitignore b/vendor/kriswallsmith/assetic/.gitignore
new file mode 100644
index 0000000..192c9c6
--- /dev/null
+++ b/vendor/kriswallsmith/assetic/.gitignore
@@ -0,0 +1,4 @@
+phpunit.xml
+vendor/
+composer.phar
+composer.lock
diff --git a/vendor/kriswallsmith/assetic/composer.json b/vendor/kriswallsmith/assetic/composer.json
index a871c3e..160ac60 100644
--- a/vendor/kriswallsmith/assetic/composer.json
+++ b/vendor/kriswallsmith/assetic/composer.json
@@ -1,5 +1,6 @@
{
"name": "kriswallsmith/assetic",
+ "minimum-stability": "dev",
"description": "Asset Management for PHP",
"keywords": ["assets", "compression", "minification"],
"homepage": "https://github.com/kriswallsmith/assetic",
@@ -20,6 +21,7 @@
"twig/twig": ">=1.6.0,<2.0",
"leafo/lessphp": "*"
},
+ "minimum-stability": "dev",
"suggest": {
"twig/twig": "Assetic provides the integration with the Twig templating engine",
"leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler"
diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php
index cfd6f5c..a4de031 100644
--- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php
+++ b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php
@@ -25,6 +25,7 @@ use Symfony\Component\Process\ProcessBuilder;
class CompassFilter implements FilterInterface
{
private $compassPath;
+ private $rubyPath;
private $scss;
// sass options
@@ -50,9 +51,10 @@ class CompassFilter implements FilterInterface
private $generatedImagesPath;
private $httpJavascriptsPath;
- public function __construct($compassPath = '/usr/bin/compass')
+ public function __construct($compassPath = '/usr/bin/compass', $rubyPath = null)
{
$this->compassPath = $compassPath;
+ $this->rubyPath = $rubyPath;
$this->cacheLocation = sys_get_temp_dir();
if ('cli' !== php_sapi_name()) {
@@ -133,6 +135,11 @@ class CompassFilter implements FilterInterface
$this->plugins[] = $plugin;
}
+ public function setLoadPaths(array $loadPaths)
+ {
+ $this->loadPaths = $loadPaths;
+ }
+
public function addLoadPath($loadPath)
{
$this->loadPaths[] = $loadPath;
@@ -171,11 +178,16 @@ class CompassFilter implements FilterInterface
// compass does not seems to handle symlink, so we use realpath()
$tempDir = realpath(sys_get_temp_dir());
- $pb = new ProcessBuilder(array(
+ $compassProcessArgs = array(
$this->compassPath,
'compile',
$tempDir,
- ));
+ );
+ if (null !== $this->rubyPath) {
+ array_unshift($compassProcessArgs, $this->rubyPath);
+ }
+
+ $pb = new ProcessBuilder($compassProcessArgs);
$pb->inheritEnvironmentVariables();
if ($this->force) {
@@ -330,12 +342,12 @@ class CompassFilter implements FilterInterface
// does we have an associative array ?
if (count(array_filter(array_keys($array), "is_numeric")) != count($array)) {
- foreach($array as $name => $value) {
+ foreach ($array as $name => $value) {
$output[] = sprintf(' :%s => "%s"', $name, addcslashes($value, '\\'));
}
$output = "{\n".implode(",\n", $output)."\n}";
} else {
- foreach($array as $name => $value) {
+ foreach ($array as $name => $value) {
$output[] = sprintf(' "%s"', addcslashes($value, '\\'));
}
$output = "[\n".implode(",\n", $output)."\n]";
diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php
index 5a73726..364b4d8 100644
--- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php
+++ b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php
@@ -30,6 +30,7 @@ class SassFilter implements FilterInterface
const STYLE_COMPRESSED = 'compressed';
private $sassPath;
+ private $rubyPath;
private $unixNewlines;
private $scss;
private $style;
@@ -41,9 +42,10 @@ class SassFilter implements FilterInterface
private $noCache;
private $compass;
- public function __construct($sassPath = '/usr/bin/sass')
+ public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null)
{
$this->sassPath = $sassPath;
+ $this->rubyPath = $rubyPath;
$this->cacheLocation = realpath(sys_get_temp_dir());
}
@@ -99,7 +101,12 @@ class SassFilter implements FilterInterface
public function filterLoad(AssetInterface $asset)
{
- $pb = new ProcessBuilder(array($this->sassPath));
+ $sassProcessArgs = array($this->sassPath);
+ if (null !== $this->rubyPath) {
+ array_unshift($sassProcessArgs, $this->rubyPath);
+ }
+
+ $pb = new ProcessBuilder($sassProcessArgs);
$root = $asset->getSourceRoot();
$path = $asset->getSourcePath();
diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php
index 6044b84..452c6d2 100644
--- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php
+++ b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php
@@ -19,9 +19,9 @@ namespace Assetic\Filter\Sass;
*/
class ScssFilter extends SassFilter
{
- public function __construct($sassPath = '/usr/bin/sass')
+ public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null)
{
- parent::__construct($sassPath);
+ parent::__construct($sassPath, $rubyPath);
$this->setScss(true);
}
diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
index 3d541d8..920987a 100644
--- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
+++ b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
@@ -80,11 +80,10 @@ abstract class BaseCompressorFilter implements FilterInterface
// input and output files
$tempDir = realpath(sys_get_temp_dir());
- $hash = substr(sha1(time().rand(11111, 99999)), 0, 7);
- $input = $tempDir.DIRECTORY_SEPARATOR.$hash.'.'.$type;
- $output = $tempDir.DIRECTORY_SEPARATOR.$hash.'-min.'.$type;
+ $input = tempnam($tempDir, 'YUI-IN-');
+ $output = tempnam($tempDir, 'YUI-OUT-');
file_put_contents($input, $content);
- $pb->add('-o')->add($output)->add($input);
+ $pb->add('-o')->add($output)->add('--type')->add($type)->add($input);
$proc = $pb->getProcess();
$code = $proc->run();
diff --git a/vendor/kriswallsmith/assetic/tests/bootstrap.php b/vendor/kriswallsmith/assetic/tests/bootstrap.php
index 767818d..f366669 100644
--- a/vendor/kriswallsmith/assetic/tests/bootstrap.php
+++ b/vendor/kriswallsmith/assetic/tests/bootstrap.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-if (!$loader = @include __DIR__.'/../vendor/.composer/autoload.php') {
+if (!$loader = @include __DIR__.'/../vendor/autoload.php') {
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
'php composer.phar install'.PHP_EOL);
@@ -43,4 +43,4 @@ if (isset($_SERVER['PACKAGER'])) {
if (isset($_SERVER['PACKER'])) {
require_once $_SERVER['PACKER'];
-}
\ No newline at end of file
+}
diff --git a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php
index 5014f21..e6399fb 100644
--- a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php
+++ b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php
@@ -57,7 +57,7 @@ class DumpCommand extends ContainerAwareCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln(sprintf('Dumping all %s assets.', $input->getOption('env')));
- $output->writeln(sprintf('Debug mode is %s.', $input->getOption('no-debug') ? 'off' : 'on'));
+ $output->writeln(sprintf('Debug mode is %s.', $this->am->isDebug() ? 'on' : 'off'));
$output->writeln('');
if (!$input->getOption('watch')) {
diff --git a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/compass.xml b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/compass.xml
index 43bbec2..5825588 100644
--- a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/compass.xml
+++ b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/compass.xml
@@ -22,6 +22,7 @@
%assetic.filter.compass.bin%
+ %assetic.ruby.bin%
%assetic.filter.compass.debug%
%assetic.filter.compass.style%
%assetic.filter.compass.images_dir%
diff --git a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/sass.xml b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/sass.xml
index 2c4e931..9df1f07 100644
--- a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/sass.xml
+++ b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/sass.xml
@@ -15,6 +15,7 @@
%assetic.filter.sass.bin%
+ %assetic.ruby.bin%
%assetic.filter.sass.style%
%assetic.filter.sass.compass%
diff --git a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/scss.xml b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/scss.xml
index 006c454..23e49bc 100644
--- a/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/scss.xml
+++ b/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Resources/config/filters/scss.xml
@@ -15,6 +15,7 @@
%assetic.filter.scss.sass%
+ %assetic.ruby.bin%
%assetic.filter.scss.style%
%assetic.filter.scss.compass%
diff --git a/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/views/Collector/swiftmailer.html.twig b/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/views/Collector/swiftmailer.html.twig
index 3c575c9..5c9ea17 100644
--- a/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/views/Collector/swiftmailer.html.twig
+++ b/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/views/Collector/swiftmailer.html.twig
@@ -46,7 +46,13 @@
{% endfor %}
-
{{ message.body|e('html', message.charset)|convert_encoding('UTF-8', message.charset) }}
+
+ {%- if message.charset %}
+ {{- message.body|e('html', message.charset)|convert_encoding('UTF-8', message.charset) }}
+ {%- else %}
+ {{- message.body|e('html') }}
+ {%- endif -%}
+
{% endfor %}
{% endif %}
diff --git a/vendor/symfony/symfony/UPGRADE-2.1.md b/vendor/symfony/symfony/UPGRADE-2.1.md
index b949f53..c8f52b8 100644
--- a/vendor/symfony/symfony/UPGRADE-2.1.md
+++ b/vendor/symfony/symfony/UPGRADE-2.1.md
@@ -13,14 +13,15 @@
configuration (i.e. `config.yml`), merging could yield a set of base URL's
for multiple environments.
- * The priorities for the built-in listeners have changed:
-
- 2.0 2.1
- security.firewall request 64 8
- locale listener early_request 253 255
- request -1 16
- router listener early_request 255 128
- request 10 32
+ * The priorities for the built-in listeners have changed.
+
+ ```
+ 2.0 2.1
+ security.firewall kernel.request 64 8
+ locale listener kernel.request 0 16
+ router listener early_request 255 n/a
+ request 0 32
+ ```
### Doctrine
@@ -106,7 +107,7 @@
if ($locale = $request->attributes->get('_locale')) {
$request->getSession()->set('_locale', $locale);
} else {
- $request->setDefaultLocale($request->getSession()->get('_locale', $this->defaultLocale));
+ $request->setLocale($request->getSession()->get('_locale', $this->defaultLocale));
}
}
@@ -1053,10 +1054,25 @@
$registry->addType($registry->resolveType(new MyFormType()));
```
+ * The method `renderBlock()` of the helper for the PHP Templating component was
+ deprecated and will be removed in Symfony 2.3. You should use `block()` instead.
+
+ Before:
+
+ ```
+ renderBlock('widget_attributes') ?>
+ ```
+
+ After:
+
+ ```
+ block('widget_attributes') ?>
+ ```
+
### Validator
* The methods `setMessage()`, `getMessageTemplate()` and
- `getMessageParameters()` in the Constraint class were deprecated and will
+ `getMessageParameters()` in the `ConstraintValidator` class were deprecated and will
be removed in Symfony 2.3.
If you have implemented custom validators, you should use the
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md
index c170225..ada3e62 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md
@@ -9,3 +9,4 @@ CHANGELOG
* DoctrineOrmTypeGuesser now guesses "collection" for array Doctrine type
* DoctrineType now caches its choice lists in order to improve performance
* DoctrineType now uses ManagerRegistry::getManagerForClass() if the option "em" is not set
+ * UniqueEntity validation constraint now accepts a "repositoryMethod" option that will be used to check for uniqueness instead of the default "findBy"
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
index 07a37d5..0123d22 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
@@ -12,11 +12,12 @@
namespace Symfony\Bridge\Doctrine\Form;
use Doctrine\Common\Persistence\ManagerRegistry;
+use Doctrine\Common\Persistence\Mapping\MappingException;
+use Doctrine\ORM\Mapping\MappingException as LegacyMappingException;
use Symfony\Component\Form\FormTypeGuesserInterface;
use Symfony\Component\Form\Guess\Guess;
use Symfony\Component\Form\Guess\TypeGuess;
use Symfony\Component\Form\Guess\ValueGuess;
-use Doctrine\ORM\Mapping\MappingException;
class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
{
@@ -145,6 +146,8 @@ class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
return $this->cache[$class] = array($em->getClassMetadata($class), $name);
} catch (MappingException $e) {
// not an entity or mapped super class
+ } catch (LegacyMappingException $e) {
+ // not an entity or mapped super class, using Doctrine ORM 2.2
}
}
}
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
index cc6aa38..48cbdda 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
@@ -114,7 +114,7 @@ abstract class DoctrineType extends AbstractType
return $choiceListCache[$hash];
};
- $emFilter = function (Options $options, $em) use ($registry) {
+ $emNormalizer = function (Options $options, $em) use ($registry) {
/* @var ManagerRegistry $registry */
if (null !== $em) {
return $registry->getManager($em);
@@ -134,8 +134,8 @@ abstract class DoctrineType extends AbstractType
'group_by' => null,
));
- $resolver->setFilters(array(
- 'em' => $emFilter,
+ $resolver->setNormalizers(array(
+ 'em' => $emNormalizer,
));
}
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
index 1e8c07f..93bb75c 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
@@ -47,6 +47,50 @@ class UniqueValidatorTest extends DoctrineOrmTestCase
return $registry;
}
+ protected function createRepositoryMock()
+ {
+ $repository = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectRepository')
+ ->setMethods(array('findByCustom', 'find', 'findAll', 'findOneBy', 'findBy', 'getClassName'))
+ ->getMock()
+ ;
+
+ return $repository;
+ }
+
+ protected function createEntityManagerMock($repositoryMock)
+ {
+ $em = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')
+ ->getMock()
+ ;
+ $em->expects($this->any())
+ ->method('getRepository')
+ ->will($this->returnValue($repositoryMock))
+ ;
+
+ $classMetadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata');
+ $classMetadata
+ ->expects($this->any())
+ ->method('hasField')
+ ->will($this->returnValue(true))
+ ;
+ $refl = $this->getMockBuilder('Doctrine\Common\Reflection\StaticReflectionProperty')
+ ->disableOriginalConstructor()
+ ->getMock()
+ ;
+ $refl
+ ->expects($this->any())
+ ->method('getValue')
+ ->will($this->returnValue(true))
+ ;
+ $classMetadata->reflFields = array('name' => $refl);
+ $em->expects($this->any())
+ ->method('getClassMetadata')
+ ->will($this->returnValue($classMetadata))
+ ;
+
+ return $em;
+ }
+
protected function createMetadataFactoryMock($metadata)
{
$metadataFactory = $this->getMock('Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface');
@@ -69,7 +113,7 @@ class UniqueValidatorTest extends DoctrineOrmTestCase
return $validatorFactory;
}
- public function createValidator($entityManagerName, $em, $validateClass = null, $uniqueFields = null, $errorPath = null)
+ public function createValidator($entityManagerName, $em, $validateClass = null, $uniqueFields = null, $errorPath = null, $repositoryMethod = 'findBy')
{
if (!$validateClass) {
$validateClass = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIdentEntity';
@@ -83,7 +127,13 @@ class UniqueValidatorTest extends DoctrineOrmTestCase
$uniqueValidator = new UniqueEntityValidator($registry);
$metadata = new ClassMetadata($validateClass);
- $metadata->addConstraint(new UniqueEntity(array('fields' => $uniqueFields, 'em' => $entityManagerName, 'errorPath' => $errorPath)));
+ $constraint = new UniqueEntity(array(
+ 'fields' => $uniqueFields,
+ 'em' => $entityManagerName,
+ 'errorPath' => $errorPath,
+ 'repositoryMethod' => $repositoryMethod
+ ));
+ $metadata->addConstraint($constraint);
$metadataFactory = $this->createMetadataFactoryMock($metadata);
$validatorFactory = $this->createValidatorFactory($uniqueValidator);
@@ -194,6 +244,23 @@ class UniqueValidatorTest extends DoctrineOrmTestCase
$this->assertEquals(1, $violationsList->count(), 'Violation found on entity with conflicting entity existing in the database.');
}
+ public function testValidateUniquenessUsingCustomRepositoryMethod()
+ {
+ $entityManagerName = 'foo';
+ $repository = $this->createRepositoryMock();
+ $repository->expects($this->once())
+ ->method('findByCustom')
+ ->will($this->returnValue(array()))
+ ;
+ $em = $this->createEntityManagerMock($repository);
+ $validator = $this->createValidator($entityManagerName, $em, null, array(), null, 'findByCustom');
+
+ $entity1 = new SingleIdentEntity(1, 'foo');
+
+ $violationsList = $validator->validate($entity1);
+ $this->assertEquals(0, $violationsList->count(), 'Violation is using custom repository method.');
+ }
+
/**
* @group GH-1635
*/
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php
index 55af119..ae4367f 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php
@@ -24,6 +24,7 @@ class UniqueEntity extends Constraint
public $message = 'This value is already used.';
public $service = 'doctrine.orm.validator.unique';
public $em = null;
+ public $repositoryMethod = 'findBy';
public $fields = array();
public $errorPath = null;
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
index 13b7b25..81b68a9 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
@@ -100,7 +100,7 @@ class UniqueEntityValidator extends ConstraintValidator
}
$repository = $em->getRepository($className);
- $result = $repository->findBy($criteria);
+ $result = $repository->{$constraint->repositoryMethod}($criteria);
/* If the result is a MongoCursor, it must be advanced to the first
* element. Rewinding should have no ill effect if $result is another
diff --git a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php
index f77965f..f07a8a4 100644
--- a/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php
+++ b/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/FormExtension.php
@@ -12,11 +12,9 @@
namespace Symfony\Bridge\Twig\Extension;
use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser;
-use Symfony\Component\Form\FormView;
-use Symfony\Component\Form\Exception\FormException;
+use Symfony\Bridge\Twig\Form\TwigRendererInterface;
+use Symfony\Component\Form\FormViewInterface;
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
-use Symfony\Component\Form\Extension\Core\View\ChoiceView;
-use Symfony\Component\Form\Util\FormUtil;
/**
* FormExtension extends Twig with form capabilities.
@@ -26,21 +24,17 @@ use Symfony\Component\Form\Util\FormUtil;
*/
class FormExtension extends \Twig_Extension
{
- protected $csrfProvider;
- protected $resources;
- protected $blocks;
- protected $environment;
- protected $themes;
- protected $varStack;
- protected $template;
+ /**
+ * This property is public so that it can be accessed directly from compiled
+ * templates without having to call a getter, which slightly decreases performance.
+ *
+ * @var \Symfony\Component\Form\FormRendererInterface
+ */
+ public $renderer;
- public function __construct(CsrfProviderInterface $csrfProvider = null, array $resources = array())
+ public function __construct(TwigRendererInterface $renderer)
{
- $this->csrfProvider = $csrfProvider;
- $this->themes = new \SplObjectStorage();
- $this->varStack = array();
- $this->blocks = new \SplObjectStorage();
- $this->resources = $resources;
+ $this->renderer = $renderer;
}
/**
@@ -48,25 +42,11 @@ class FormExtension extends \Twig_Extension
*/
public function initRuntime(\Twig_Environment $environment)
{
- $this->environment = $environment;
+ $this->renderer->setEnvironment($environment);
}
/**
- * Sets a theme for a given view.
- *
- * @param FormView $view A FormView instance
- * @param array|string $resources An array of resource names|a resource name
- */
- public function setTheme(FormView $view, $resources)
- {
- $this->themes->attach($view, (array) $resources);
- $this->blocks = new \SplObjectStorage();
- }
-
- /**
- * Returns the token parser instance to add to the existing list.
- *
- * @return array An array of Twig_TokenParser instances
+ * {@inheritdoc}
*/
public function getTokenParsers()
{
@@ -76,305 +56,39 @@ class FormExtension extends \Twig_Extension
);
}
+ /**
+ * {@inheritdoc}
+ */
public function getFunctions()
{
return array(
- 'form_enctype' => new \Twig_Function_Method($this, 'renderEnctype', array('is_safe' => array('html'))),
- 'form_widget' => new \Twig_Function_Method($this, 'renderWidget', array('is_safe' => array('html'))),
- 'form_errors' => new \Twig_Function_Method($this, 'renderErrors', array('is_safe' => array('html'))),
- 'form_label' => new \Twig_Function_Method($this, 'renderLabel', array('is_safe' => array('html'))),
- 'form_row' => new \Twig_Function_Method($this, 'renderRow', array('is_safe' => array('html'))),
- 'form_rest' => new \Twig_Function_Method($this, 'renderRest', array('is_safe' => array('html'))),
- 'csrf_token' => new \Twig_Function_Method($this, 'getCsrfToken'),
- '_form_is_choice_group' => new \Twig_Function_Method($this, 'isChoiceGroup', array('is_safe' => array('html'))),
- '_form_is_choice_selected' => new \Twig_Function_Method($this, 'isChoiceSelected', array('is_safe' => array('html'))),
+ 'form_enctype' => new \Twig_Function_Method($this, 'renderer->renderEnctype', array('is_safe' => array('html'))),
+ 'form_widget' => new \Twig_Function_Method($this, 'renderer->renderWidget', array('is_safe' => array('html'))),
+ 'form_errors' => new \Twig_Function_Method($this, 'renderer->renderErrors', array('is_safe' => array('html'))),
+ 'form_label' => new \Twig_Function_Method($this, 'renderer->renderLabel', array('is_safe' => array('html'))),
+ 'form_row' => new \Twig_Function_Method($this, 'renderer->renderRow', array('is_safe' => array('html'))),
+ 'form_rest' => new \Twig_Function_Method($this, 'renderer->renderRest', array('is_safe' => array('html'))),
+ 'csrf_token' => new \Twig_Function_Method($this, 'renderer->renderCsrfToken'),
+ '_form_is_choice_group' => new \Twig_Function_Method($this, 'renderer->isChoiceGroup', array('is_safe' => array('html'))),
+ '_form_is_choice_selected' => new \Twig_Function_Method($this, 'renderer->isChoiceSelected', array('is_safe' => array('html'))),
);
}
+ /**
+ * {@inheritdoc}
+ */
public function getFilters()
{
return array(
- 'humanize' => new \Twig_Filter_Function(__NAMESPACE__.'\humanize'),
+ 'humanize' => new \Twig_Filter_Method($this, 'renderer->humanize'),
);
}
- public function isChoiceGroup($label)
- {
- return FormUtil::isChoiceGroup($label);
- }
-
- public function isChoiceSelected(FormView $view, ChoiceView $choice)
- {
- return FormUtil::isChoiceSelected($choice->getValue(), $view->getVar('value'));
- }
-
/**
- * Renders the HTML enctype in the form tag, if necessary
- *
- * Example usage in Twig templates:
- *
- *
-
+
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml
index 3d13360..ea17954 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml
@@ -15,6 +15,8 @@
Symfony\Bundle\FrameworkBundle\Templating\Helper\CodeHelper
Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper
Symfony\Bundle\FrameworkBundle\Templating\Helper\FormHelper
+ Symfony\Component\Form\Extension\Templating\TemplatingRendererEngine
+ Symfony\Component\Form\FormRenderer
Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables
Symfony\Bundle\FrameworkBundle\Templating\Asset\PathPackage
Symfony\Component\Templating\Asset\UrlPackage
@@ -96,11 +98,19 @@
+
+
+
+
-
%templating.helper.form.resources%
+
+
+
+
+
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
index 632b311..621cf9c 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
@@ -1 +1 @@
-renderBlock('widget_attributes') ?>
+block('widget_attributes') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php
index fff427d..2efc537 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/checkbox_widget.html.php
@@ -1,5 +1,5 @@
renderBlock('widget_attributes') ?>
+ block('widget_attributes') ?>
value="escape($value) ?>"
checked="checked"
/>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php
index eae0d92..9beb0ad 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_options.html.php
@@ -1 +1 @@
-renderBlock('choice_widget_options') ?>
+block('choice_widget_options') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php
index 99db4ac..66e23ef 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget.html.php
@@ -1,5 +1,5 @@
-renderBlock('choice_widget_expanded') ?>
+block('choice_widget_expanded') ?>
-renderBlock('choice_widget_collapsed') ?>
+block('choice_widget_collapsed') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
index b0c601e..dd3655b 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
@@ -1,13 +1,13 @@
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php
index 58de38d..b4b9a0f 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_expanded.html.php
@@ -1,4 +1,4 @@
-renderBlock('widget_container_attributes') ?>>
+
block('widget_container_attributes') ?>>
widget($child) ?>
label($child) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php
index 3edfa44..588028b 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/container_attributes.html.php
@@ -1 +1 @@
-renderBlock('widget_container_attributes') ?>
+block('widget_container_attributes') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php
index 439443c..7e087be 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/date_widget.html.php
@@ -1,7 +1,7 @@
- renderBlock('form_widget_simple'); ?>
+ block('form_widget_simple'); ?>
-
renderBlock('widget_container_attributes') ?>>
+
block('widget_container_attributes') ?>>
widget($form['year']),
$view['form']->widget($form['month']),
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php
index 6864874..3685c08 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php
@@ -1,7 +1,7 @@
- renderBlock('form_widget_simple'); ?>
+ block('form_widget_simple'); ?>
-
renderBlock('widget_container_attributes') ?>>
+
block('widget_container_attributes') ?>>
widget($form['date']).' '.$view['form']->widget($form['time']) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php
index 0ef4d9d..782de8c 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/email_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : 'email')) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : 'email')) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_enctype.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_enctype.html.php
index baab129..1f56ba0 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_enctype.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_enctype.html.php
@@ -1 +1 @@
-renderBlock('form_enctype') ?>
+block('form_enctype') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_errors.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_errors.html.php
index d4cbe1b..4542230 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_errors.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_errors.html.php
@@ -1 +1 @@
-renderBlock('form_errors') ?>
+block('form_errors') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_label.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_label.html.php
index 71d055c..bd9fd27 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_label.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_label.html.php
@@ -1 +1 @@
-renderBlock('form_label') ?>
+block('form_label') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rest.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rest.html.php
index fe9bae0..8341168 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rest.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rest.html.php
@@ -1 +1 @@
-renderBlock('form_rest') ?>
+block('form_rest') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_row.html.php
index 8077ff3..10c4952 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_row.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_row.html.php
@@ -1 +1 @@
-renderBlock('form_row') ?>
+block('form_row') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rows.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rows.html.php
index b9a07bc..62b69ab 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rows.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_rows.html.php
@@ -1 +1 @@
-renderBlock('form_rows') ?>
+block('form_rows') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_widget.html.php
index 2621130..627555c 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple') ?>
+block('form_widget_simple') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
index 0e63418..4695c1c 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
@@ -1,5 +1,5 @@
-renderBlock('form_widget_compound')?>
+block('form_widget_compound')?>
-renderBlock('form_widget_simple')?>
+block('form_widget_simple')?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php
index 9321a69..6124d2f 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_compound.html.php
@@ -1,4 +1,4 @@
-
renderBlock('widget_container_attributes') ?>>
+
block('widget_container_attributes') ?>>
hasParent() && $errors): ?>
@@ -6,6 +6,6 @@
|
- renderBlock('form_rows') ?>
+ block('form_rows') ?>
rest($form) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php
index 29649cf..203f7a4 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget_simple.html.php
@@ -1,5 +1,5 @@
value="escape($value) ?>"
- renderBlock('widget_attributes') ?>
+ block('widget_attributes') ?>
/>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php
index 7dc71ae..120ebd1 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/hidden_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "hidden")) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : "hidden")) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php
index 14000a5..aa34a0f 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/integer_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "number")) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : "number")) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php
index 6c84a87..f829637 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple'), $money_pattern) ?>
+block('form_widget_simple'), $money_pattern) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php
index c3344d8..6fa4aa4 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/number_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "text")) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : "text")) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php
index ab0bcaf..463b39e 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/password_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "password")) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : "password")) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php
index 38b51c0..36bc2a1 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "text")) ?> %
+block('form_widget_simple', array('type' => isset($type) ? $type : "text")) ?> %
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php
index 3ecad14..024ca8c 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/radio_widget.html.php
@@ -1,5 +1,5 @@
renderBlock('widget_attributes') ?>
+ block('widget_attributes') ?>
value="escape($value) ?>"
checked="checked"
/>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php
index b9a07bc..62b69ab 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/repeated_row.html.php
@@ -1 +1 @@
-renderBlock('form_rows') ?>
+block('form_rows') ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php
index e071e95..04cd5a5 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/search_widget.html.php
@@ -1 +1 @@
-renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "search")) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : "search")) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php
index a82744b..5973706 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/textarea_widget.html.php
@@ -1 +1 @@
-
+
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php
index fb7f94c..9483561 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php
@@ -1,7 +1,7 @@
- renderBlock('form_widget_simple'); ?>
+ block('form_widget_simple'); ?>
-
renderBlock('widget_container_attributes') ?>>
+
block('widget_container_attributes') ?>>
renderBlock('form_widget_simple', array('type' => isset($type) ? $type : "url")) ?>
+block('form_widget_simple', array('type' => isset($type) ? $type : "url")) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php
index b022830..d4d0d08 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views/FormTable/form_widget_compound.html.php
@@ -1,7 +1,7 @@
-
renderBlock('widget_container_attributes') ?>>
+block('widget_container_attributes') ?>>
hasParent()): ?>
errors($form) ?>
- renderBlock('form_rows') ?>
+ block('form_rows') ?>
rest($form) ?>
diff --git a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
index a2b5afc..b82f6ef 100644
--- a/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
+++ b/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
@@ -12,8 +12,9 @@
namespace Symfony\Bundle\FrameworkBundle\Templating\Helper;
use Symfony\Component\Templating\Helper\Helper;
+use Symfony\Component\Form\FormRendererInterface;
+use Symfony\Component\Form\FormViewInterface;
use Symfony\Component\Templating\EngineInterface;
-use Symfony\Component\Form\FormView;
use Symfony\Component\Form\Exception\FormException;
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
@@ -27,46 +28,35 @@ use Symfony\Component\Form\Util\FormUtil;
*/
class FormHelper extends Helper
{
- protected $engine;
-
- protected $csrfProvider;
-
- protected $varStack;
-
- protected $context;
-
- protected $resources;
-
- protected $themes;
-
- protected $templates;
+ /**
+ * @var FormRendererInterface
+ */
+ private $renderer;
/**
- * Constructor.
- *
- * @param EngineInterface $engine The templating engine
- * @param CsrfProviderInterface $csrfProvider The CSRF provider
- * @param array $resources An array of theme names
+ * @param FormRendererInterface $renderer
*/
- public function __construct(EngineInterface $engine, CsrfProviderInterface $csrfProvider = null, array $resources = array())
+ public function __construct(FormRendererInterface $renderer)
{
- $this->engine = $engine;
- $this->csrfProvider = $csrfProvider;
- $this->resources = $resources;
- $this->varStack = array();
- $this->context = array();
- $this->templates = array();
- $this->themes = array();
+ $this->renderer = $renderer;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName()
+ {
+ return 'form';
}
public function isChoiceGroup($label)
{
- return FormUtil::isChoiceGroup($label);
+ return $this->renderer->isChoiceGroup($label);
}
- public function isChoiceSelected(FormView $view, ChoiceView $choice)
+ public function isChoiceSelected(FormViewInterface $view, ChoiceView $choice)
{
- return FormUtil::isChoiceSelected($choice->getValue(), $view->getVar('value'));
+ return $this->renderer->isChoiceSelected($view, $choice);
}
/**
@@ -74,13 +64,12 @@ class FormHelper extends Helper
*
* The theme format is ":".
*
- * @param FormView $view A FormView instance
+ * @param FormViewInterface $view A FormViewInterface instance
* @param string|array $themes A theme or an array of theme
*/
- public function setTheme(FormView $view, $themes)
+ public function setTheme(FormViewInterface $view, $themes)
{
- $this->themes[$view->getVar('id')] = (array) $themes;
- $this->templates = array();
+ $this->renderer->setTheme($view, $themes);
}
/**
@@ -90,13 +79,13 @@ class FormHelper extends Helper
*
*
');return w.join('');};function s(t){return t.getAttribute(
if(q!==undefined)this.setValue(q);};function n(){var o;for(var p=0;p
';j.add('elementspath',{requires:['selection'],init:function(o){var p='cke_path_'+o.name,q,r=function(){if(!q)q=a.document.getById(p);return q;},s='cke_elementspath_'+e.getNextNumber()+'_';o._.elementsPath={idBase:s,filters:[]};o.on('themeSpace',function(x){if(x.data.space=='bottom')x.data.html+=''+o.lang.elementsPath.eleLabel+''+''+n+'
';});function t(x){o.focus();var y=o._.elementsPath.list[x];if(y.is('body')){var z=new d.range(o.document);z.selectNodeContents(y);z.select();}else o.getSelection().selectElement(y);};var u=e.addFunction(t),v=e.addFunction(function(x,y){var z=o._.elementsPath.idBase,A;y=new d.event(y);var B=o.lang.dir=='rtl';switch(y.getKeystroke()){case B?39:37:case 9:A=a.document.getById(z+(x+1));if(!A)A=a.document.getById(z+'0');A.focus();return false;case B?37:39:case 2228224+9:A=a.document.getById(z+(x-1));if(!A)A=a.document.getById(z+(o._.elementsPath.list.length-1));A.focus();return false;case 27:o.focus();return false;case 13:case 32:t(x);return false;}return true;});o.on('selectionChange',function(x){var y=b,z=x.data.selection,A=z.getStartElement(),B=[],C=x.editor,D=C._.elementsPath.list=[],E=C._.elementsPath.filters;while(A){var F=0,G;if(A.data('cke-display-name'))G=A.data('cke-display-name');else if(A.data('cke-real-element-type'))G=A.data('cke-real-element-type');else G=A.getName();for(var H=0;H',G,''+L+'','');
}if(G=='body')break;A=A.getParent();}var M=r();M.setHtml(B.join('')+n);C.fire('elementsPathUpdate',{space:M});});function w(){q&&q.setHtml(n);delete o._.elementsPath.list;};o.on('readOnly',w);o.on('contentDomUnload',w);o.addCommand('elementsPathFocus',m.toolbarFocus);}});})();(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(t){t.addCommand('enter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){r(v);}});t.addCommand('shiftEnter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){q(v);}});var u=t.keystrokeHandler.keystrokes;u[13]='enter';u[2228224+13]='shiftEnter';}});j.enterkey={enterBlock:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=v.checkStartOfBlock(),z=v.checkEndOfBlock(),A=new d.elementPath(v.startContainer),B=A.block;if(y&&z){if(B&&(B.is('li')||B.getParent().is('li'))){t.execCommand('outdent');return;}if(B&&B.getParent().is('blockquote')){B.breakParent(B.getParent());if(!B.getPrevious().getFirst(d.walker.invisible(1)))B.getPrevious().remove();if(!B.getNext().getFirst(d.walker.invisible(1)))B.getNext().remove();v.moveToElementEditStart(B);v.select();return;}}else if(B&&B.is('pre')){if(!z){n(t,u,v,w);return;}}else if(B&&f.$captionBlock[B.getName()]){n(t,u,v,w);return;}var C=u==3?'div':'p',D=v.splitBlock(C);if(!D)return;var E=D.previousBlock,F=D.nextBlock,G=D.wasStartOfBlock,H=D.wasEndOfBlock,I;if(F){I=F.getParent();if(I.is('li')){F.breakParent(I);F.move(F.getNext(),1);}}else if(E&&(I=E.getParent())&&I.is('li')){E.breakParent(I);I=E.getNext();v.moveToElementEditStart(I);E.move(E.getPrevious());}if(!G&&!H){if(F.is('li')&&(I=F.getFirst(d.walker.invisible(true)))&&I.is&&I.is('ul','ol'))(c?x.createText('\xa0'):x.createElement('br')).insertBefore(I);if(F)v.moveToElementEditStart(F);}else{var J,K;if(E){if(E.is('li')||!(p.test(E.getName())||E.is('pre')))J=E.clone();}else if(F)J=F.clone();if(!J){if(I&&I.is('li'))J=I;else{J=x.createElement(C);if(E&&(K=E.getDirection()))J.setAttribute('dir',K);}}else if(w&&!J.is('li'))J.renameNode(C);var L=D.elementPath;if(L)for(var M=0,N=L.elements.length;M0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt,amp',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';
+P.scrollIntoView();v.deleteContents();}else J.scrollIntoView();v.select();},enterBr:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=u==3?'div':'p',z=v.checkEndOfBlock(),A=new d.elementPath(t.getSelection().getStartElement()),B=A.block,C=B&&A.block.getName(),D=false;if(!w&&C=='li'){o(t,u,v,w);return;}if(!w&&z&&p.test(C)){var E,F;if(F=B.getDirection()){E=x.createElement('div');E.setAttribute('dir',F);E.insertAfter(B);v.setStart(E,0);}else{x.createElement('br').insertAfter(B);if(b.gecko)x.createText('').insertAfter(B);v.setStartAt(B.getNext(),c?3:1);}}else{var G;D=C=='pre';if(D&&!b.gecko)G=x.createText(c?'\r':'\n');else G=x.createElement('br');v.deleteContents();v.insertNode(G);if(c)v.setStartAt(G,4);else{x.createText('\ufeff').insertAfter(G);if(z)G.getParent().appendBogus();G.getNext().$.nodeValue='';v.setStartAt(G.getNext(),1);var H=null;if(!b.gecko){H=x.createElement('span');H.setHtml(' ');}else H=x.createElement('br');H.insertBefore(G.getNext());H.scrollIntoView();H.remove();}}v.collapse(true);v.select(D);}};var m=j.enterkey,n=m.enterBr,o=m.enterBlock,p=/^h[1-6]$/;function q(t){if(t.mode!='wysiwyg')return false;return r(t,t.config.shiftEnterMode,1);};function r(t,u,v){v=t.config.forceEnterMode||v;if(t.mode!='wysiwyg')return false;if(!u)u=t.config.enterMode;setTimeout(function(){t.fire('saveSnapshot');if(u==2)n(t,u,null,v);else o(t,u,null,v);t.fire('saveSnapshot');},0);return true;};function s(t){var u=t.getSelection().getRanges(true);for(var v=u.length-1;v>0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt,amp',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv,ohungarumlaut,Ohungarumlaut,uhungarumlaut,Uhungarumlaut';
function q(r,s){var t={},u=[],v={nbsp:'\xa0',shy:'',gt:'>',lt:'<',amp:'&'};r=r.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(A,B){var C=s?'&'+B+';':v[B],D=s?v[B]:'&'+B+';';t[C]=D;u.push(C);return '';});if(!s&&r){r=r.split(',');var w=document.createElement('div'),x;w.innerHTML='&'+r.join(';&')+';';x=w.innerHTML;w=null;for(var y=0;y