{"action":"created","comment":{"url":"https://api.github.com/repos/akeneo/pim-docs/pulls/comments/60965877","id":60965877,"diff_hunk":"@@ -109,3 +113,120 @@ For the form validation you will have to add a new validation file:\n     :language: yaml\n     :prepend: # /src/Acme/Bundle/CatalogBundle/Resources/config/validation/category.yml\n     :linenos:\n+\n+Add Translatable Properties to your own Category\n+--------------------------------------------------\n+\n+Extend the category entity and its translation entity\n+*****************************************************\n+\n+The first step is to create a class that extends PIM ``CategoryTranslation`` class.\n+\n+For example, we can add an optional description property with a text field.\n+\n+.. literalinclude:: ../../src/Acme/Bundle/CatalogBundle/Entity/CategoryTranslation.php\n+   :language: php\n+   :prepend: # /src/Acme/Bundle/CatalogBundle/Entity/CategoryTranslation.php\n+   :linenos:\n+\n+Then we need to link this description to the ``Category`` class.\n+\n+.. literalinclude:: ../../src/Acme/Bundle/CatalogBundle/Entity/TranslatableCategory.php\n+   :language: php\n+   :prepend: # /src/Acme/Bundle/CatalogBundle/Entity/Category.php\n+   :linenos:\n+\n+Configure the mapping override\n+******************************\n+\n+Then, define the mapping for your own field only:\n+\n+.. literalinclude:: ../../src/Acme/Bundle/CatalogBundle/Resources/config/doctrine/CategoryTranslation.orm.yml\n+    :language: yaml\n+    :prepend: # /src/Acme/Bundle/CatalogBundle/Resources/config/doctrine/CategoryCategoryTranslation.orm.yml\n+    :linenos:\n+\n+As we override the ``Category`` class, we need to redefine its mapping too, even if we have nothing to add in it:\n+\n+.. literalinclude:: ../../src/Acme/Bundle/CatalogBundle/Resources/config/doctrine/TranslatableCategory.orm.yml\n+    :language: yaml\n+    :prepend: # /src/Acme/Bundle/CatalogBundle/Resources/config/doctrine/Category.orm.yml\n+    :linenos:\n+\n+You also need to configure the mapping override in your application configuration (to avoid to copy/paste the whole parent class mapping):\n+\n+.. code-block:: yaml\n+\n+    # app/config/config.yml\n+    akeneo_storage_utils:\n+        mapping_overrides:\n+            -\n+                original: Pim\\Bundle\\CatalogBundle\\Entity\\Category\n+                override: Acme\\Bundle\\CatalogBundle\\Entity\\Category\n+            -\n+                original: Pim\\Bundle\\CatalogBundle\\Entity\\CategoryTranslation\n+                override: Acme\\Bundle\\CatalogBundle\\Entity\\CategoryTranslation\n+\n+Define the Category Class\n+*************************\n+\n+You need to update your category entity parameter used in ``entities.yml`` file (if you are creating a new bundle, double check that this file is inside the extension):","path":"cookbook/category/add-properties-to-category.rst","position":108,"original_position":108,"commit_id":"c5a693e74e6c049dfa75daf439167ad002d37c4c","original_commit_id":"c5a693e74e6c049dfa75daf439167ad002d37c4c","user":{"login":"a2xchip","id":6627334,"avatar_url":"https://avatars.githubusercontent.com/u/6627334?v=3","gravatar_id":"","url":"https://api.github.com/users/a2xchip","html_url":"https://github.com/a2xchip","followers_url":"https://api.github.com/users/a2xchip/followers","following_url":"https://api.github.com/users/a2xchip/following{/other_user}","gists_url":"https://api.github.com/users/a2xchip/gists{/gist_id}","starred_url":"https://api.github.com/users/a2xchip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a2xchip/subscriptions","organizations_url":"https://api.github.com/users/a2xchip/orgs","repos_url":"https://api.github.com/users/a2xchip/repos","events_url":"https://api.github.com/users/a2xchip/events{/privacy}","received_events_url":"https://api.github.com/users/a2xchip/received_events","type":"User","site_admin":false},"body":"Same here","created_at":"2016-04-25T18:43:29Z","updated_at":"2016-04-25T18:43:29Z","html_url":"https://github.com/akeneo/pim-docs/pull/310#discussion_r60965877","pull_request_url":"https://api.github.com/repos/akeneo/pim-docs/pulls/310","_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-docs/pulls/comments/60965877"},"html":{"href":"https://github.com/akeneo/pim-docs/pull/310#discussion_r60965877"},"pull_request":{"href":"https://api.github.com/repos/akeneo/pim-docs/pulls/310"}}},"pull_request":{"url":"https://api.github.com/repos/akeneo/pim-docs/pulls/310","id":67714907,"html_url":"https://github.com/akeneo/pim-docs/pull/310","diff_url":"https://github.com/akeneo/pim-docs/pull/310.diff","patch_url":"https://github.com/akeneo/pim-docs/pull/310.patch","issue_url":"https://api.github.com/repos/akeneo/pim-docs/issues/310","number":310,"state":"open","locked":false,"title":"Complete the cookbook on category override","user":{"login":"damien-carcel","id":5039018,"avatar_url":"https://avatars.githubusercontent.com/u/5039018?v=3","gravatar_id":"","url":"https://api.github.com/users/damien-carcel","html_url":"https://github.com/damien-carcel","followers_url":"https://api.github.com/users/damien-carcel/followers","following_url":"https://api.github.com/users/damien-carcel/following{/other_user}","gists_url":"https://api.github.com/users/damien-carcel/gists{/gist_id}","starred_url":"https://api.github.com/users/damien-carcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damien-carcel/subscriptions","organizations_url":"https://api.github.com/users/damien-carcel/orgs","repos_url":"https://api.github.com/users/damien-carcel/repos","events_url":"https://api.github.com/users/damien-carcel/events{/privacy}","received_events_url":"https://api.github.com/users/damien-carcel/received_events","type":"User","site_admin":false},"body":"Add a new section to explain how to add a translatable property","created_at":"2016-04-25T12:57:51Z","updated_at":"2016-04-25T18:43:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b92e41a5036f3978b29870fb522d982d7fbdf4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akeneo/pim-docs/pulls/310/commits","review_comments_url":"https://api.github.com/repos/akeneo/pim-docs/pulls/310/comments","review_comment_url":"https://api.github.com/repos/akeneo/pim-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akeneo/pim-docs/issues/310/comments","statuses_url":"https://api.github.com/repos/akeneo/pim-docs/statuses/c5a693e74e6c049dfa75daf439167ad002d37c4c","head":{"label":"akeneo:category-translation-override","ref":"category-translation-override","sha":"c5a693e74e6c049dfa75daf439167ad002d37c4c","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":12193604,"name":"pim-docs","full_name":"akeneo/pim-docs","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-docs","description":"[Community Documentation Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-docs","forks_url":"https://api.github.com/repos/akeneo/pim-docs/forks","keys_url":"https://api.github.com/repos/akeneo/pim-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-docs/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-docs/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-docs/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-docs/events","assignees_url":"https://api.github.com/repos/akeneo/pim-docs/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-docs/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-docs/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-docs/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-docs/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-docs/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-docs/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-docs/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-docs/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-docs/merges","archive_url":"https://api.github.com/repos/akeneo/pim-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-docs/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-docs/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-docs/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-docs/releases{/id}","deployments_url":"https://api.github.com/repos/akeneo/pim-docs/deployments","created_at":"2013-08-18T10:17:30Z","updated_at":"2016-04-18T17:29:17Z","pushed_at":"2016-04-25T18:27:29Z","git_url":"git://github.com/akeneo/pim-docs.git","ssh_url":"git@github.com:akeneo/pim-docs.git","clone_url":"https://github.com/akeneo/pim-docs.git","svn_url":"https://github.com/akeneo/pim-docs","homepage":"http://docs.akeneo.com/latest/index.html","size":3405,"stargazers_count":17,"watchers_count":17,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":10,"forks":42,"open_issues":10,"watchers":17,"default_branch":"master"}},"base":{"label":"akeneo:1.5","ref":"1.5","sha":"45bde30df34dcd5f93b6d6b1ce81cc1a08b04842","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":12193604,"name":"pim-docs","full_name":"akeneo/pim-docs","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-docs","description":"[Community Documentation Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-docs","forks_url":"https://api.github.com/repos/akeneo/pim-docs/forks","keys_url":"https://api.github.com/repos/akeneo/pim-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-docs/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-docs/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-docs/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-docs/events","assignees_url":"https://api.github.com/repos/akeneo/pim-docs/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-docs/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-docs/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-docs/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-docs/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-docs/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-docs/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-docs/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-docs/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-docs/merges","archive_url":"https://api.github.com/repos/akeneo/pim-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-docs/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-docs/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-docs/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-docs/releases{/id}","deployments_url":"https://api.github.com/repos/akeneo/pim-docs/deployments","created_at":"2013-08-18T10:17:30Z","updated_at":"2016-04-18T17:29:17Z","pushed_at":"2016-04-25T18:27:29Z","git_url":"git://github.com/akeneo/pim-docs.git","ssh_url":"git@github.com:akeneo/pim-docs.git","clone_url":"https://github.com/akeneo/pim-docs.git","svn_url":"https://github.com/akeneo/pim-docs","homepage":"http://docs.akeneo.com/latest/index.html","size":3405,"stargazers_count":17,"watchers_count":17,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":10,"forks":42,"open_issues":10,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-docs/pulls/310"},"html":{"href":"https://github.com/akeneo/pim-docs/pull/310"},"issue":{"href":"https://api.github.com/repos/akeneo/pim-docs/issues/310"},"comments":{"href":"https://api.github.com/repos/akeneo/pim-docs/issues/310/comments"},"review_comments":{"href":"https://api.github.com/repos/akeneo/pim-docs/pulls/310/comments"},"review_comment":{"href":"https://api.github.com/repos/akeneo/pim-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akeneo/pim-docs/pulls/310/commits"},"statuses":{"href":"https://api.github.com/repos/akeneo/pim-docs/statuses/c5a693e74e6c049dfa75daf439167ad002d37c4c"}}}}