")
*/
public $comments;
/**
diff --git a/src/Entity/StackOfVotes.php b/src/Entity/StackOfVotes.php
index 397464c..2916446 100755
--- a/src/Entity/StackOfVotes.php
+++ b/src/Entity/StackOfVotes.php
@@ -11,6 +11,7 @@ use JMS\Serializer\Annotation as Serializer;
* contains the votes for one answer to a poll
* @ORM\Entity(repositoryClass="App\Repository\StackOfVotesRepository")
* @ORM\HasLifecycleCallbacks()
+ * @Serializer\ExclusionPolicy("all")
*/
class StackOfVotes {
/**
@@ -32,7 +33,6 @@ class StackOfVotes {
public $votes;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Poll", inversedBy="stacksOfVotes", cascade={"persist"})
- * @Serializer\Expose()
*/
private $poll;
diff --git a/src/Entity/Vote.php b/src/Entity/Vote.php
index 00a5857..6134d18 100755
--- a/src/Entity/Vote.php
+++ b/src/Entity/Vote.php
@@ -8,10 +8,11 @@
/**
* @ORM\Entity(repositoryClass="App\Repository\VoteRepository")
+ * @Serializer\ExclusionPolicy("all")
*/
class Vote {
/**
- * for a text kind of choice: could be "yes" "no" "maybe" and emptu.
+ * for a text kind of choice: could be "yes" "no" "maybe" and empty.
* for a date kind, the choice linked is equivalent to the value selected
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Type("string")
@@ -42,7 +43,6 @@
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Poll", inversedBy="votes", cascade={"persist"})
* @ORM\JoinColumn(nullable=false)
- * @Serializer\Type("App\Entity\Poll")
*/
private $poll;
/**
diff --git a/src/Form/PollType.php b/src/Form/PollType.php
new file mode 100644
index 0000000..56f99a6
--- /dev/null
+++ b/src/Form/PollType.php
@@ -0,0 +1,39 @@
+add('title')
+ ->add('customUrl')
+ ->add('description')
+ ->add('creationDate')
+ ->add('expiracyDate')
+ ->add('kind')
+ ->add('allowedAnswers')
+ ->add('modificationPolicy')
+ ->add('mailOnComment')
+ ->add('mailOnVote')
+ ->add('hideResults')
+ ->add('showResultEvenIfPasswords')
+ ->add('password')
+ ->add('adminKey')
+ ->add('owner')
+ ;
+ }
+
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'data_class' => Poll::class,
+ ]);
+ }
+}
diff --git a/src/GraphQL/Resolver/ApartmentResolver.php b/src/GraphQL/Resolver/ApartmentResolver.php
new file mode 100644
index 0000000..cc6d932
--- /dev/null
+++ b/src/GraphQL/Resolver/ApartmentResolver.php
@@ -0,0 +1,30 @@
+em = $em;
+ }
+
+ public function resolve( Argument $args ) {
+ $apartment = $this->em->getRepository( 'App:Apartment' )->find( $args[ 'id' ] );
+
+ return $apartment;
+ }
+
+ public function getAliases() {
+ return [
+ 'resolve',
+ 'Apartment',
+ ];
+ }
+}
diff --git a/symfony.lock b/symfony.lock
index e9a8466..7923095 100755
--- a/symfony.lock
+++ b/symfony.lock
@@ -1,4 +1,7 @@
{
+ "composer/package-versions-deprecated": {
+ "version": "1.11.99.1"
+ },
"doctrine/annotations": {
"version": "1.0",
"recipe": {
@@ -90,12 +93,12 @@
"doctrine/reflection": {
"version": "v1.0.0"
},
+ "doctrine/sql-formatter": {
+ "version": "1.1.1"
+ },
"egulias/email-validator": {
"version": "2.1.15"
},
- "exsyst/swagger": {
- "version": "v0.4.1"
- },
"friendsofsymfony/rest-bundle": {
"version": "2.2",
"recipe": {
@@ -108,48 +111,6 @@
"config/packages/fos_rest.yaml"
]
},
- "hoa/compiler": {
- "version": "3.17.08.08"
- },
- "hoa/consistency": {
- "version": "1.17.05.02"
- },
- "hoa/event": {
- "version": "1.17.01.13"
- },
- "hoa/exception": {
- "version": "1.17.01.16"
- },
- "hoa/file": {
- "version": "1.17.07.11"
- },
- "hoa/iterator": {
- "version": "2.17.01.10"
- },
- "hoa/math": {
- "version": "1.17.05.16"
- },
- "hoa/protocol": {
- "version": "1.17.01.14"
- },
- "hoa/regex": {
- "version": "1.17.01.13"
- },
- "hoa/stream": {
- "version": "1.17.02.21"
- },
- "hoa/ustring": {
- "version": "4.17.01.16"
- },
- "hoa/visitor": {
- "version": "2.17.01.16"
- },
- "hoa/zformat": {
- "version": "1.17.01.10"
- },
- "jdorn/sql-formatter": {
- "version": "v1.2.17"
- },
"jms/metadata": {
"version": "2.1.0"
},
@@ -170,6 +131,18 @@
"config/packages/prod/jms_serializer.yaml"
]
},
+ "laminas/laminas-code": {
+ "version": "3.4.1"
+ },
+ "laminas/laminas-eventmanager": {
+ "version": "3.3.0"
+ },
+ "laminas/laminas-zendframework-bridge": {
+ "version": "1.1.1"
+ },
+ "liip/test-fixtures-bundle": {
+ "version": "1.8.0"
+ },
"nelmio/api-doc-bundle": {
"version": "3.0",
"recipe": {
@@ -204,8 +177,22 @@
"ocramius/proxy-manager": {
"version": "2.2.3"
},
+ "overblog/graphql-bundle": {
+ "version": "0.12",
+ "recipe": {
+ "repo": "github.com/symfony/recipes-contrib",
+ "branch": "master",
+ "version": "0.12",
+ "ref": "c01dcfb85a6e93f1a43ef36151fcff11cf17f791"
+ },
+ "files": [
+ "config/graphql/types/.gitignore",
+ "config/packages/graphql.yaml",
+ "config/routes/graphql.yaml"
+ ]
+ },
"php": {
- "version": "7.3"
+ "version": "7.4"
},
"phpdocumentor/reflection-common": {
"version": "2.0.0"
@@ -240,6 +227,12 @@
"swiftmailer/swiftmailer": {
"version": "v6.2.3"
},
+ "symfony/asset": {
+ "version": "v4.3.11"
+ },
+ "symfony/browser-kit": {
+ "version": "v4.3.11"
+ },
"symfony/cache": {
"version": "v4.3.5"
},
@@ -268,9 +261,15 @@
"symfony/dependency-injection": {
"version": "v4.3.5"
},
+ "symfony/deprecation-contracts": {
+ "version": "v2.2.0"
+ },
"symfony/doctrine-bridge": {
"version": "v4.3.5"
},
+ "symfony/dom-crawler": {
+ "version": "v4.3.11"
+ },
"symfony/dotenv": {
"version": "v4.3.5"
},
@@ -365,12 +364,30 @@
"symfony/orm-pack": {
"version": "v1.0.7"
},
+ "symfony/phpunit-bridge": {
+ "version": "4.3",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "master",
+ "version": "4.3",
+ "ref": "6d0e35f749d5f4bfe1f011762875275cd3f9874f"
+ },
+ "files": [
+ ".env.test",
+ "bin/phpunit",
+ "phpunit.xml.dist",
+ "tests/bootstrap.php"
+ ]
+ },
"symfony/polyfill-intl-icu": {
"version": "v1.12.0"
},
"symfony/polyfill-intl-idn": {
"version": "v1.12.0"
},
+ "symfony/polyfill-intl-normalizer": {
+ "version": "v1.20.0"
+ },
"symfony/polyfill-mbstring": {
"version": "v1.12.0"
},
@@ -406,6 +423,9 @@
"symfony/security-core": {
"version": "v4.3.5"
},
+ "symfony/security-csrf": {
+ "version": "v4.3.11"
+ },
"symfony/service-contracts": {
"version": "v1.1.7"
},
@@ -472,15 +492,40 @@
"ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a"
}
},
+ "symfony/webpack-encore-bundle": {
+ "version": "1.6",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "master",
+ "version": "1.6",
+ "ref": "69e1d805ad95964088bd510c05995e87dc391564"
+ },
+ "files": [
+ "assets/app.js",
+ "assets/styles/app.css",
+ "config/packages/assets.yaml",
+ "config/packages/prod/webpack_encore.yaml",
+ "config/packages/test/webpack_encore.yaml",
+ "config/packages/webpack_encore.yaml",
+ "package.json",
+ "webpack.config.js"
+ ]
+ },
"symfony/yaml": {
"version": "v4.3.5"
},
"twig/twig": {
"version": "v2.12.3"
},
+ "webimpress/safe-writer": {
+ "version": "2.1.0"
+ },
"webmozart/assert": {
"version": "1.5.0"
},
+ "webonyx/graphql-php": {
+ "version": "v0.13.9"
+ },
"willdurand/jsonp-callback-validator": {
"version": "v1.1.0"
},
diff --git a/templates/base.html.twig b/templates/base.html.twig
index 34dd070..76db111 100755
--- a/templates/base.html.twig
+++ b/templates/base.html.twig
@@ -3,10 +3,25 @@
{% block title %}Framdate{% endblock %}
- {% block stylesheets %}{% endblock %}
+ {% block stylesheets %}
+
+
+ {% endblock %}
-{% block body %}{% endblock %}
-{% block javascripts %}{% endblock %}
+{% include 'split/header.html.twig' %}
+
+{% block outerBody %}
+
+
+ {% block body %}{% endblock %}
+
+
+{% endblock %}
+{% include 'split/footer.html.twig' %}
+{% block javascripts %}
+
+
+{% endblock %}