{"action":"created","comment":{"url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/comments/58542752","id":58542752,"diff_hunk":"@@ -0,0 +1,311 @@\n+<?php\n+\n+namespace Grossum\\BlogBundle\\Entity;\n+\n+use Doctrine\\Common\\Collections\\ArrayCollection;\n+\n+/**\n+ * Post\n+ */\n+class Post\n+{\n+    /**\n+     * @var integer\n+     */\n+    private $id;\n+\n+    /**\n+     * @var string\n+     */\n+    private $title;\n+\n+    /**\n+     * @var string\n+     */\n+    private $shortDescription;\n+\n+    /**\n+     * @var string\n+     */\n+    private $description;\n+\n+    /**\n+     * @var \\Grossum\\BlogBundle\\Entity\\Category\n+     */\n+    private $category;\n+\n+    /**\n+     * @var \\Doctrine\\Common\\Collections\\Collection\n+     */\n+    private $tags;\n+\n+    /**\n+     * @var \\Application\\Sonata\\MediaBundle\\Entity\\Media\n+     */\n+    private $images;\n+\n+    /**\n+     * @var \\DateTime\n+     */\n+    private $currentDataTime;\n+\n+    /**\n+     * @var \\DateTime\n+     */\n+    private $createdAt;\n+\n+    /**\n+     * @var \\DateTime\n+     */\n+    private $updatedAt;\n+\n+    /**\n+     * Post constructor.\n+     */\n+    public function __construct()\n+    {\n+        $this->tags = new ArrayCollection();\n+        $this->images = new ArrayCollection();\n+        $this->currentDataTime = new \\DateTime();\n+    }\n+\n+    /**\n+     * Get id\n+     *\n+     * @return integer\n+     */\n+    public function getId()\n+    {\n+        return $this->id;\n+    }\n+\n+    /**\n+     * Set title\n+     *\n+     * @param string $title\n+     *\n+     * @return Post\n+     */\n+    public function setTitle($title)\n+    {\n+        $this->title = $title;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * Get title\n+     *\n+     * @return string\n+     */\n+    public function getTitle()\n+    {\n+        return $this->title;\n+    }\n+\n+    /**\n+     * Set shortDescription\n+     *\n+     * @param string $shortDescription\n+     *\n+     * @return Post\n+     */\n+    public function setShortDescription($shortDescription)\n+    {\n+        $this->shortDescription = $shortDescription;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * Get shortDescription\n+     *\n+     * @return string\n+     */\n+    public function getShortDescription()\n+    {\n+        return $this->shortDescription;\n+    }\n+\n+    /**\n+     * Set description\n+     *\n+     * @param string $description\n+     *\n+     * @return Post\n+     */\n+    public function setDescription($description)\n+    {\n+        $this->description = $description;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * Get description\n+     *\n+     * @return string\n+     */\n+    public function getDescription()\n+    {\n+        return $this->description;\n+    }\n+\n+    /**\n+     * Set category\n+     *\n+     * @param \\Grossum\\BlogBundle\\Entity\\Category $category\n+     *\n+     * @return Post\n+     */\n+    public function setCategory(\\Grossum\\BlogBundle\\Entity\\Category $category = null)\n+    {\n+        $this->category = $category;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * Get category\n+     *\n+     * @return \\Grossum\\BlogBundle\\Entity\\Category\n+     */\n+    public function getCategory()\n+    {\n+        return $this->category;\n+    }\n+\n+    /**\n+     * Add tag\n+     *\n+     * @param \\Grossum\\BlogBundle\\Entity\\Tag $tag\n+     *\n+     * @return Post\n+     */\n+    public function addTag(\\Grossum\\BlogBundle\\Entity\\Tag $tag)\n+    {\n+        $this->tags[] = $tag;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * Remove tag\n+     *\n+     * @param \\Grossum\\BlogBundle\\Entity\\Tag $tag\n+     */\n+    public function removeTag(\\Grossum\\BlogBundle\\Entity\\Tag $tag)\n+    {\n+        $this->tags->removeElement($tag);\n+    }\n+\n+    /**\n+     * Get tags\n+     *\n+     * @return \\Doctrine\\Common\\Collections\\Collection\n+     */\n+    public function getTags()\n+    {\n+        return $this->tags;\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    public function __toString()\n+    {\n+        return $this->title ?: 'Новый пост';\n+    }\n+\n+    /**\n+     * Get images\n+     *\n+     * @return \\Application\\Sonata\\MediaBundle\\Entity\\Media\n+     */\n+    public function getImages()\n+    {\n+        return $this->images;\n+    }\n+\n+    /**\n+     * Add image\n+     *\n+     * @param \\Application\\Sonata\\MediaBundle\\Entity\\Media $image\n+     *\n+     * @return Post\n+     */\n+    public function addImage(\\Application\\Sonata\\MediaBundle\\Entity\\Media $image)\n+    {\n+        $this->images[] = $image;","path":"htdocs/src/Grossum/BlogBundle/Entity/Post.php","position":239,"original_position":239,"commit_id":"dddec5cd93e8db07984a9f5d9cb5c77e7669271f","original_commit_id":"dddec5cd93e8db07984a9f5d9cb5c77e7669271f","user":{"login":"aivus","id":1021703,"avatar_url":"https://avatars.githubusercontent.com/u/1021703?v=3","gravatar_id":"","url":"https://api.github.com/users/aivus","html_url":"https://github.com/aivus","followers_url":"https://api.github.com/users/aivus/followers","following_url":"https://api.github.com/users/aivus/following{/other_user}","gists_url":"https://api.github.com/users/aivus/gists{/gist_id}","starred_url":"https://api.github.com/users/aivus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aivus/subscriptions","organizations_url":"https://api.github.com/users/aivus/orgs","repos_url":"https://api.github.com/users/aivus/repos","events_url":"https://api.github.com/users/aivus/events{/privacy}","received_events_url":"https://api.github.com/users/aivus/received_events","type":"User","site_admin":false},"body":"Like in `Category::add*` method","created_at":"2016-04-05T14:01:22Z","updated_at":"2016-04-05T14:01:22Z","html_url":"https://github.com/ronder92/Symfony2-Base-Instance/pull/11#discussion_r58542752","pull_request_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/comments/58542752"},"html":{"href":"https://github.com/ronder92/Symfony2-Base-Instance/pull/11#discussion_r58542752"},"pull_request":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11","id":65303966,"html_url":"https://github.com/ronder92/Symfony2-Base-Instance/pull/11","diff_url":"https://github.com/ronder92/Symfony2-Base-Instance/pull/11.diff","patch_url":"https://github.com/ronder92/Symfony2-Base-Instance/pull/11.patch","issue_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/11","number":11,"state":"open","locked":false,"title":"Create necessary entities","user":{"login":"ronder92","id":570896,"avatar_url":"https://avatars.githubusercontent.com/u/570896?v=3","gravatar_id":"","url":"https://api.github.com/users/ronder92","html_url":"https://github.com/ronder92","followers_url":"https://api.github.com/users/ronder92/followers","following_url":"https://api.github.com/users/ronder92/following{/other_user}","gists_url":"https://api.github.com/users/ronder92/gists{/gist_id}","starred_url":"https://api.github.com/users/ronder92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronder92/subscriptions","organizations_url":"https://api.github.com/users/ronder92/orgs","repos_url":"https://api.github.com/users/ronder92/repos","events_url":"https://api.github.com/users/ronder92/events{/privacy}","received_events_url":"https://api.github.com/users/ronder92/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-05T13:28:05Z","updated_at":"2016-04-05T14:01:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcbaa33950e40fc19b09e8dc561449f3401d124b","assignee":{"login":"malavsky","id":10234031,"avatar_url":"https://avatars.githubusercontent.com/u/10234031?v=3","gravatar_id":"","url":"https://api.github.com/users/malavsky","html_url":"https://github.com/malavsky","followers_url":"https://api.github.com/users/malavsky/followers","following_url":"https://api.github.com/users/malavsky/following{/other_user}","gists_url":"https://api.github.com/users/malavsky/gists{/gist_id}","starred_url":"https://api.github.com/users/malavsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malavsky/subscriptions","organizations_url":"https://api.github.com/users/malavsky/orgs","repos_url":"https://api.github.com/users/malavsky/repos","events_url":"https://api.github.com/users/malavsky/events{/privacy}","received_events_url":"https://api.github.com/users/malavsky/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11/commits","review_comments_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11/comments","review_comment_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/11/comments","statuses_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/statuses/dddec5cd93e8db07984a9f5d9cb5c77e7669271f","head":{"label":"ronder92:create_entites","ref":"create_entites","sha":"dddec5cd93e8db07984a9f5d9cb5c77e7669271f","user":{"login":"ronder92","id":570896,"avatar_url":"https://avatars.githubusercontent.com/u/570896?v=3","gravatar_id":"","url":"https://api.github.com/users/ronder92","html_url":"https://github.com/ronder92","followers_url":"https://api.github.com/users/ronder92/followers","following_url":"https://api.github.com/users/ronder92/following{/other_user}","gists_url":"https://api.github.com/users/ronder92/gists{/gist_id}","starred_url":"https://api.github.com/users/ronder92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronder92/subscriptions","organizations_url":"https://api.github.com/users/ronder92/orgs","repos_url":"https://api.github.com/users/ronder92/repos","events_url":"https://api.github.com/users/ronder92/events{/privacy}","received_events_url":"https://api.github.com/users/ronder92/received_events","type":"User","site_admin":false},"repo":{"id":55399774,"name":"Symfony2-Base-Instance","full_name":"ronder92/Symfony2-Base-Instance","owner":{"login":"ronder92","id":570896,"avatar_url":"https://avatars.githubusercontent.com/u/570896?v=3","gravatar_id":"","url":"https://api.github.com/users/ronder92","html_url":"https://github.com/ronder92","followers_url":"https://api.github.com/users/ronder92/followers","following_url":"https://api.github.com/users/ronder92/following{/other_user}","gists_url":"https://api.github.com/users/ronder92/gists{/gist_id}","starred_url":"https://api.github.com/users/ronder92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronder92/subscriptions","organizations_url":"https://api.github.com/users/ronder92/orgs","repos_url":"https://api.github.com/users/ronder92/repos","events_url":"https://api.github.com/users/ronder92/events{/privacy}","received_events_url":"https://api.github.com/users/ronder92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ronder92/Symfony2-Base-Instance","description":"","fork":false,"url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance","forks_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/forks","keys_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/teams","hooks_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/hooks","issue_events_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/events{/number}","events_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/events","assignees_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/assignees{/user}","branches_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/branches{/branch}","tags_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/tags","blobs_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/refs{/sha}","trees_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/statuses/{sha}","languages_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/languages","stargazers_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/stargazers","contributors_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/contributors","subscribers_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/subscribers","subscription_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/subscription","commits_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/commits{/sha}","git_commits_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/commits{/sha}","comments_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/comments{/number}","issue_comment_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/comments{/number}","contents_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/contents/{+path}","compare_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/merges","archive_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/downloads","issues_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues{/number}","pulls_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls{/number}","milestones_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/milestones{/number}","notifications_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/labels{/name}","releases_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/releases{/id}","deployments_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/deployments","created_at":"2016-04-04T09:37:51Z","updated_at":"2016-04-04T09:37:58Z","pushed_at":"2016-04-05T13:28:05Z","git_url":"git://github.com/ronder92/Symfony2-Base-Instance.git","ssh_url":"git@github.com:ronder92/Symfony2-Base-Instance.git","clone_url":"https://github.com/ronder92/Symfony2-Base-Instance.git","svn_url":"https://github.com/ronder92/Symfony2-Base-Instance","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"ronder92:develop","ref":"develop","sha":"398434c4280d617d3521dade6d5e113dc63acd33","user":{"login":"ronder92","id":570896,"avatar_url":"https://avatars.githubusercontent.com/u/570896?v=3","gravatar_id":"","url":"https://api.github.com/users/ronder92","html_url":"https://github.com/ronder92","followers_url":"https://api.github.com/users/ronder92/followers","following_url":"https://api.github.com/users/ronder92/following{/other_user}","gists_url":"https://api.github.com/users/ronder92/gists{/gist_id}","starred_url":"https://api.github.com/users/ronder92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronder92/subscriptions","organizations_url":"https://api.github.com/users/ronder92/orgs","repos_url":"https://api.github.com/users/ronder92/repos","events_url":"https://api.github.com/users/ronder92/events{/privacy}","received_events_url":"https://api.github.com/users/ronder92/received_events","type":"User","site_admin":false},"repo":{"id":55399774,"name":"Symfony2-Base-Instance","full_name":"ronder92/Symfony2-Base-Instance","owner":{"login":"ronder92","id":570896,"avatar_url":"https://avatars.githubusercontent.com/u/570896?v=3","gravatar_id":"","url":"https://api.github.com/users/ronder92","html_url":"https://github.com/ronder92","followers_url":"https://api.github.com/users/ronder92/followers","following_url":"https://api.github.com/users/ronder92/following{/other_user}","gists_url":"https://api.github.com/users/ronder92/gists{/gist_id}","starred_url":"https://api.github.com/users/ronder92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronder92/subscriptions","organizations_url":"https://api.github.com/users/ronder92/orgs","repos_url":"https://api.github.com/users/ronder92/repos","events_url":"https://api.github.com/users/ronder92/events{/privacy}","received_events_url":"https://api.github.com/users/ronder92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ronder92/Symfony2-Base-Instance","description":"","fork":false,"url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance","forks_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/forks","keys_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/teams","hooks_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/hooks","issue_events_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/events{/number}","events_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/events","assignees_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/assignees{/user}","branches_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/branches{/branch}","tags_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/tags","blobs_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/refs{/sha}","trees_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/statuses/{sha}","languages_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/languages","stargazers_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/stargazers","contributors_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/contributors","subscribers_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/subscribers","subscription_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/subscription","commits_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/commits{/sha}","git_commits_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/git/commits{/sha}","comments_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/comments{/number}","issue_comment_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/comments{/number}","contents_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/contents/{+path}","compare_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/merges","archive_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/downloads","issues_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues{/number}","pulls_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls{/number}","milestones_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/milestones{/number}","notifications_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/labels{/name}","releases_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/releases{/id}","deployments_url":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/deployments","created_at":"2016-04-04T09:37:51Z","updated_at":"2016-04-04T09:37:58Z","pushed_at":"2016-04-05T13:28:05Z","git_url":"git://github.com/ronder92/Symfony2-Base-Instance.git","ssh_url":"git@github.com:ronder92/Symfony2-Base-Instance.git","clone_url":"https://github.com/ronder92/Symfony2-Base-Instance.git","svn_url":"https://github.com/ronder92/Symfony2-Base-Instance","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11"},"html":{"href":"https://github.com/ronder92/Symfony2-Base-Instance/pull/11"},"issue":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/11"},"comments":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/ronder92/Symfony2-Base-Instance/statuses/dddec5cd93e8db07984a9f5d9cb5c77e7669271f"}}}}