{"action":"created","comment":{"url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments/44263804","id":44263804,"diff_hunk":"@@ -0,0 +1,196 @@\n+<?php\n+\n+namespace Activity\\Form;\n+\n+use Zend\\Form\\Form;\n+//input filter\n+use Zend\\InputFilter\\Factory as InputFactory;\n+use Zend\\InputFilter\\InputFilter;\n+use Zend\\InputFilter\\InputFilterInterface;\n+use Zend\\InputFilter\\CollectionInputFilter;\n+use Zend\\Stdlib\\Hydrator\\ClassMethods as ClassMethodsHydrator;\n+use Zend\\InputFilter\\InputFilterProviderInterface;\n+\n+class ActivitySignup extends Form implements InputFilterProviderInterface\n+{\n+    protected $inputFilter;\n+    protected $fields;\n+    public function __construct($fields)\n+    {\n+        parent::__construct('activitysignup');\n+        $this->setAttribute('method', 'post');\n+        $this->setHydrator(new ClassMethodsHydrator(false))\n+            ->setObject(new \\Activity\\Model\\ActivitySignup());\n+        $this->fields = $fields;\n+        foreach($fields as $field){\n+            $this->add($this->createFieldElementArray($field));\n+        }\n+        \n+        $this->add([\n+            'name' => 'submit',\n+            'attributes' => [\n+                'type' => 'submit',\n+                'value' => 'Subscribe',\n+            ],\n+        ]);\n+    }\n+/*\n+ *         return [\n+            'name' => [\n+                'required' => true\n+            ],\n+            'type' => [\n+                'required' => true, \n+                'validators' => [\n+                    [\n+                        'name' => 'Between',\n+                        'options' => [\n+                            'min' => 0,\n+                            'max' => 3\n+                        ]\n+                    ],\n+                    ['name' => 'IsInt'],\n+                    [\n+                        'name' => 'Callback',\n+                        'options' => [\n+                            'messages' => [\n+                            \\Zend\\Validator\\Callback::INVALID_VALUE => \n+                                'Some of the required fields for this type are empty'\n+                            ],\n+                            'callback' => function($value, $context=null) {\n+                                return $this->fieldDependantRequired($value, $context, 'min. value', '2') &&\n+                                       $this->fieldDependantRequired($value, $context, 'max. value', '2') &&\n+                                       $this->fieldDependantRequired($value, $context, 'options', '3');\n+                            }\n+                        ]\n+                    ]\n+                ]\n+            ],\n+            'min. value' => [\n+                'required' => false,\n+                'validators' => [\n+                    ['name' => 'IsInt']\n+                ]\n+            ],\n+            'max. value' => [\n+                'required' => false,\n+                'validators' => [\n+                    ['name' => 'IsInt']\n+                ]\n+            ]                    \n+        ];\n+    }\n+*/","path":"module/Activity/src/Activity/Form/ActivitySignup.php","position":83,"original_position":83,"commit_id":"cd1ca73d837131393c089fbc904e60a1272e1740","original_commit_id":"cd1ca73d837131393c089fbc904e60a1272e1740","user":{"login":"jszanto","id":7968933,"avatar_url":"https://avatars.githubusercontent.com/u/7968933?v=3","gravatar_id":"","url":"https://api.github.com/users/jszanto","html_url":"https://github.com/jszanto","followers_url":"https://api.github.com/users/jszanto/followers","following_url":"https://api.github.com/users/jszanto/following{/other_user}","gists_url":"https://api.github.com/users/jszanto/gists{/gist_id}","starred_url":"https://api.github.com/users/jszanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszanto/subscriptions","organizations_url":"https://api.github.com/users/jszanto/orgs","repos_url":"https://api.github.com/users/jszanto/repos","events_url":"https://api.github.com/users/jszanto/events{/privacy}","received_events_url":"https://api.github.com/users/jszanto/received_events","type":"User","site_admin":false},"body":"Als dit niet meer nodig is, dan is het mogelijk handig om het weg te halen","created_at":"2015-11-09T11:13:55Z","updated_at":"2015-11-09T11:13:55Z","html_url":"https://github.com/GEWIS/gewisweb/pull/226#discussion_r44263804","pull_request_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226","_links":{"self":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments/44263804"},"html":{"href":"https://github.com/GEWIS/gewisweb/pull/226#discussion_r44263804"},"pull_request":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226"}}},"pull_request":{"url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226","id":49748468,"html_url":"https://github.com/GEWIS/gewisweb/pull/226","diff_url":"https://github.com/GEWIS/gewisweb/pull/226.diff","patch_url":"https://github.com/GEWIS/gewisweb/pull/226.patch","issue_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/226","number":226,"state":"open","locked":false,"title":"Issue126","user":{"login":"mstruijs","id":8017652,"avatar_url":"https://avatars.githubusercontent.com/u/8017652?v=3","gravatar_id":"","url":"https://api.github.com/users/mstruijs","html_url":"https://github.com/mstruijs","followers_url":"https://api.github.com/users/mstruijs/followers","following_url":"https://api.github.com/users/mstruijs/following{/other_user}","gists_url":"https://api.github.com/users/mstruijs/gists{/gist_id}","starred_url":"https://api.github.com/users/mstruijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstruijs/subscriptions","organizations_url":"https://api.github.com/users/mstruijs/orgs","repos_url":"https://api.github.com/users/mstruijs/repos","events_url":"https://api.github.com/users/mstruijs/events{/privacy}","received_events_url":"https://api.github.com/users/mstruijs/received_events","type":"User","site_admin":false},"body":"A partial fix for issue #126. This allows additional data fields to be defined upon creation of the activity and stored. The additional fields are not yet implemented in the signup process, display and storage of signup data. (Maybe make that another issue?)","created_at":"2015-11-04T21:31:12Z","updated_at":"2015-11-09T11:13:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b0a8da517a72a3ae663a71c355e1e15f8cdff94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226/commits","review_comments_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226/comments","review_comment_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/226/comments","statuses_url":"https://api.github.com/repos/GEWIS/gewisweb/statuses/cd1ca73d837131393c089fbc904e60a1272e1740","head":{"label":"mstruijs:issue126","ref":"issue126","sha":"cd1ca73d837131393c089fbc904e60a1272e1740","user":{"login":"mstruijs","id":8017652,"avatar_url":"https://avatars.githubusercontent.com/u/8017652?v=3","gravatar_id":"","url":"https://api.github.com/users/mstruijs","html_url":"https://github.com/mstruijs","followers_url":"https://api.github.com/users/mstruijs/followers","following_url":"https://api.github.com/users/mstruijs/following{/other_user}","gists_url":"https://api.github.com/users/mstruijs/gists{/gist_id}","starred_url":"https://api.github.com/users/mstruijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstruijs/subscriptions","organizations_url":"https://api.github.com/users/mstruijs/orgs","repos_url":"https://api.github.com/users/mstruijs/repos","events_url":"https://api.github.com/users/mstruijs/events{/privacy}","received_events_url":"https://api.github.com/users/mstruijs/received_events","type":"User","site_admin":false},"repo":{"id":21320948,"name":"gewisweb","full_name":"mstruijs/gewisweb","owner":{"login":"mstruijs","id":8017652,"avatar_url":"https://avatars.githubusercontent.com/u/8017652?v=3","gravatar_id":"","url":"https://api.github.com/users/mstruijs","html_url":"https://github.com/mstruijs","followers_url":"https://api.github.com/users/mstruijs/followers","following_url":"https://api.github.com/users/mstruijs/following{/other_user}","gists_url":"https://api.github.com/users/mstruijs/gists{/gist_id}","starred_url":"https://api.github.com/users/mstruijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstruijs/subscriptions","organizations_url":"https://api.github.com/users/mstruijs/orgs","repos_url":"https://api.github.com/users/mstruijs/repos","events_url":"https://api.github.com/users/mstruijs/events{/privacy}","received_events_url":"https://api.github.com/users/mstruijs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mstruijs/gewisweb","description":"GEWIS Website","fork":true,"url":"https://api.github.com/repos/mstruijs/gewisweb","forks_url":"https://api.github.com/repos/mstruijs/gewisweb/forks","keys_url":"https://api.github.com/repos/mstruijs/gewisweb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mstruijs/gewisweb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mstruijs/gewisweb/teams","hooks_url":"https://api.github.com/repos/mstruijs/gewisweb/hooks","issue_events_url":"https://api.github.com/repos/mstruijs/gewisweb/issues/events{/number}","events_url":"https://api.github.com/repos/mstruijs/gewisweb/events","assignees_url":"https://api.github.com/repos/mstruijs/gewisweb/assignees{/user}","branches_url":"https://api.github.com/repos/mstruijs/gewisweb/branches{/branch}","tags_url":"https://api.github.com/repos/mstruijs/gewisweb/tags","blobs_url":"https://api.github.com/repos/mstruijs/gewisweb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mstruijs/gewisweb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mstruijs/gewisweb/git/refs{/sha}","trees_url":"https://api.github.com/repos/mstruijs/gewisweb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mstruijs/gewisweb/statuses/{sha}","languages_url":"https://api.github.com/repos/mstruijs/gewisweb/languages","stargazers_url":"https://api.github.com/repos/mstruijs/gewisweb/stargazers","contributors_url":"https://api.github.com/repos/mstruijs/gewisweb/contributors","subscribers_url":"https://api.github.com/repos/mstruijs/gewisweb/subscribers","subscription_url":"https://api.github.com/repos/mstruijs/gewisweb/subscription","commits_url":"https://api.github.com/repos/mstruijs/gewisweb/commits{/sha}","git_commits_url":"https://api.github.com/repos/mstruijs/gewisweb/git/commits{/sha}","comments_url":"https://api.github.com/repos/mstruijs/gewisweb/comments{/number}","issue_comment_url":"https://api.github.com/repos/mstruijs/gewisweb/issues/comments{/number}","contents_url":"https://api.github.com/repos/mstruijs/gewisweb/contents/{+path}","compare_url":"https://api.github.com/repos/mstruijs/gewisweb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mstruijs/gewisweb/merges","archive_url":"https://api.github.com/repos/mstruijs/gewisweb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mstruijs/gewisweb/downloads","issues_url":"https://api.github.com/repos/mstruijs/gewisweb/issues{/number}","pulls_url":"https://api.github.com/repos/mstruijs/gewisweb/pulls{/number}","milestones_url":"https://api.github.com/repos/mstruijs/gewisweb/milestones{/number}","notifications_url":"https://api.github.com/repos/mstruijs/gewisweb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mstruijs/gewisweb/labels{/name}","releases_url":"https://api.github.com/repos/mstruijs/gewisweb/releases{/id}","created_at":"2014-06-29T10:16:58Z","updated_at":"2014-03-14T15:48:32Z","pushed_at":"2015-11-08T21:44:15Z","git_url":"git://github.com/mstruijs/gewisweb.git","ssh_url":"git@github.com:mstruijs/gewisweb.git","clone_url":"https://github.com/mstruijs/gewisweb.git","svn_url":"https://github.com/mstruijs/gewisweb","homepage":null,"size":4028,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"feature/members-module"}},"base":{"label":"GEWIS:master","ref":"master","sha":"d14fa0f30f33ab4fe28d0e000132131b8f22119b","user":{"login":"GEWIS","id":1815510,"avatar_url":"https://avatars.githubusercontent.com/u/1815510?v=3","gravatar_id":"","url":"https://api.github.com/users/GEWIS","html_url":"https://github.com/GEWIS","followers_url":"https://api.github.com/users/GEWIS/followers","following_url":"https://api.github.com/users/GEWIS/following{/other_user}","gists_url":"https://api.github.com/users/GEWIS/gists{/gist_id}","starred_url":"https://api.github.com/users/GEWIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GEWIS/subscriptions","organizations_url":"https://api.github.com/users/GEWIS/orgs","repos_url":"https://api.github.com/users/GEWIS/repos","events_url":"https://api.github.com/users/GEWIS/events{/privacy}","received_events_url":"https://api.github.com/users/GEWIS/received_events","type":"Organization","site_admin":false},"repo":{"id":16512277,"name":"gewisweb","full_name":"GEWIS/gewisweb","owner":{"login":"GEWIS","id":1815510,"avatar_url":"https://avatars.githubusercontent.com/u/1815510?v=3","gravatar_id":"","url":"https://api.github.com/users/GEWIS","html_url":"https://github.com/GEWIS","followers_url":"https://api.github.com/users/GEWIS/followers","following_url":"https://api.github.com/users/GEWIS/following{/other_user}","gists_url":"https://api.github.com/users/GEWIS/gists{/gist_id}","starred_url":"https://api.github.com/users/GEWIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GEWIS/subscriptions","organizations_url":"https://api.github.com/users/GEWIS/orgs","repos_url":"https://api.github.com/users/GEWIS/repos","events_url":"https://api.github.com/users/GEWIS/events{/privacy}","received_events_url":"https://api.github.com/users/GEWIS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GEWIS/gewisweb","description":"GEWIS Website","fork":false,"url":"https://api.github.com/repos/GEWIS/gewisweb","forks_url":"https://api.github.com/repos/GEWIS/gewisweb/forks","keys_url":"https://api.github.com/repos/GEWIS/gewisweb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GEWIS/gewisweb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GEWIS/gewisweb/teams","hooks_url":"https://api.github.com/repos/GEWIS/gewisweb/hooks","issue_events_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/events{/number}","events_url":"https://api.github.com/repos/GEWIS/gewisweb/events","assignees_url":"https://api.github.com/repos/GEWIS/gewisweb/assignees{/user}","branches_url":"https://api.github.com/repos/GEWIS/gewisweb/branches{/branch}","tags_url":"https://api.github.com/repos/GEWIS/gewisweb/tags","blobs_url":"https://api.github.com/repos/GEWIS/gewisweb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GEWIS/gewisweb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GEWIS/gewisweb/git/refs{/sha}","trees_url":"https://api.github.com/repos/GEWIS/gewisweb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GEWIS/gewisweb/statuses/{sha}","languages_url":"https://api.github.com/repos/GEWIS/gewisweb/languages","stargazers_url":"https://api.github.com/repos/GEWIS/gewisweb/stargazers","contributors_url":"https://api.github.com/repos/GEWIS/gewisweb/contributors","subscribers_url":"https://api.github.com/repos/GEWIS/gewisweb/subscribers","subscription_url":"https://api.github.com/repos/GEWIS/gewisweb/subscription","commits_url":"https://api.github.com/repos/GEWIS/gewisweb/commits{/sha}","git_commits_url":"https://api.github.com/repos/GEWIS/gewisweb/git/commits{/sha}","comments_url":"https://api.github.com/repos/GEWIS/gewisweb/comments{/number}","issue_comment_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/comments{/number}","contents_url":"https://api.github.com/repos/GEWIS/gewisweb/contents/{+path}","compare_url":"https://api.github.com/repos/GEWIS/gewisweb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GEWIS/gewisweb/merges","archive_url":"https://api.github.com/repos/GEWIS/gewisweb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GEWIS/gewisweb/downloads","issues_url":"https://api.github.com/repos/GEWIS/gewisweb/issues{/number}","pulls_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls{/number}","milestones_url":"https://api.github.com/repos/GEWIS/gewisweb/milestones{/number}","notifications_url":"https://api.github.com/repos/GEWIS/gewisweb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GEWIS/gewisweb/labels{/name}","releases_url":"https://api.github.com/repos/GEWIS/gewisweb/releases{/id}","created_at":"2014-02-04T13:22:05Z","updated_at":"2015-05-06T10:10:51Z","pushed_at":"2015-11-09T09:46:39Z","git_url":"git://github.com/GEWIS/gewisweb.git","ssh_url":"git@github.com:GEWIS/gewisweb.git","clone_url":"https://github.com/GEWIS/gewisweb.git","svn_url":"https://github.com/GEWIS/gewisweb","homepage":null,"size":5864,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":51,"forks":11,"open_issues":51,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226"},"html":{"href":"https://github.com/GEWIS/gewisweb/pull/226"},"issue":{"href":"https://api.github.com/repos/GEWIS/gewisweb/issues/226"},"comments":{"href":"https://api.github.com/repos/GEWIS/gewisweb/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/GEWIS/gewisweb/statuses/cd1ca73d837131393c089fbc904e60a1272e1740"}}}}