{"action":"created","comment":{"url":"https://api.github.com/repos/dkorhov/drupal_training/pulls/comments/92171801","pull_request_review_id":12681275,"id":92171801,"diff_hunk":"@@ -0,0 +1,285 @@\n+<?php\n+\n+/**\n+ * @file\n+ * Main file.\n+ */\n+\n+define('TRAINING_TASK_FOUR_ENTITY_NAME', 'text_message');\n+\n+/**\n+ * Implements hook_entity_info().\n+ */\n+function training_task_four_entity_info() {\n+\n+  $info[TRAINING_TASK_FOUR_ENTITY_NAME] = array(\n+    'label' => t('Text message'),\n+    'plural label' => t('Text messages'),\n+    'entity class' => 'Entity',\n+    'controller class' => 'EntityAPIController',\n+    'base table' => 'text_messages',\n+    'entity keys' => array(\n+      'id' => 'id',\n+      'label' => 'title',\n+    ),\n+    'module' => 'training_task_four',\n+  );\n+\n+  return $info;\n+}\n+\n+/**\n+ * Implements hook_menu().\n+ */\n+function training_task_four_menu() {\n+  $items['messages'] = array(\n+    'title' => 'All messages',\n+    'page callback' => '_training_task_four_text_messages_landing_page',\n+    'access arguments' => array('access content'),\n+    'expanded' => TRUE,\n+    'file' => 'training_task_four.pages.inc',\n+  );\n+\n+  $items['messages/%/view'] = array(\n+    'title' => 'View',\n+    'page callback' => '_training_task_four_text_messages_view_page',\n+    'page arguments' => array(1),\n+    'type' => MENU_DEFAULT_LOCAL_TASK,\n+    'access arguments' => array('access content'),\n+    'weight' => -1,\n+    'file' => 'training_task_four.pages.inc',\n+  );\n+\n+  $items['messages/%'] = array(\n+    'title' => 'View message',\n+    'page callback' => '_training_task_four_text_messages_view_page',\n+    'page arguments' => array(1),\n+    'type' => MENU_NORMAL_ITEM,\n+    'access arguments' => array('access content'),\n+    'file' => 'training_task_four.pages.inc',\n+  );\n+\n+  $items['messages/%/edit'] = array(\n+    'title' => 'Edit',\n+    'page callback' => '_training_task_four_text_messages_edit_page',\n+    'page arguments' => array(1),\n+    'access callback' => 'training_task_four_access_edit_message',\n+    'access arguments' => array(1),\n+    'type' => MENU_LOCAL_TASK,\n+    'weight' => 0,\n+    'file' => 'training_task_four.pages.inc',\n+  );\n+\n+  $items['messages/%/delete'] = array(\n+    'title' => 'Delete',\n+    'page callback' => 'drupal_get_form',\n+    'page arguments' => array('training_task_four_delete_message_confirm', 1),\n+    'access callback' => 'training_task_four_access_delete_message',\n+    'access arguments' => array(1),\n+    'weight' => 1,\n+    'type' => MENU_LOCAL_TASK,\n+    'file' => 'training_task_four.pages.inc',\n+  );\n+\n+  $items['messages/add'] = array(\n+    'title' => 'Create message',\n+    'page callback' => '_training_task_four_text_messages_add_page',\n+    'access arguments' => array('access content'),\n+    'file' => 'training_task_four.pages.inc',\n+  );\n+\n+  return $items;\n+}\n+\n+/**\n+ * Implements hook_permission().\n+ */\n+function training_task_four_permission() {\n+  return array(\n+    'delete messages' => array(","path":"docroot/sites/all/modules/custom/training_task_four/training_task_four.module","position":99,"original_position":99,"commit_id":"16bc81816b8b92ba3b4585985b4a0a4238726413","original_commit_id":"16bc81816b8b92ba3b4585985b4a0a4238726413","user":{"login":"dprudnikov","id":9367836,"avatar_url":"https://avatars.githubusercontent.com/u/9367836?v=3","gravatar_id":"","url":"https://api.github.com/users/dprudnikov","html_url":"https://github.com/dprudnikov","followers_url":"https://api.github.com/users/dprudnikov/followers","following_url":"https://api.github.com/users/dprudnikov/following{/other_user}","gists_url":"https://api.github.com/users/dprudnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/dprudnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dprudnikov/subscriptions","organizations_url":"https://api.github.com/users/dprudnikov/orgs","repos_url":"https://api.github.com/users/dprudnikov/repos","events_url":"https://api.github.com/users/dprudnikov/events{/privacy}","received_events_url":"https://api.github.com/users/dprudnikov/received_events","type":"User","site_admin":false},"body":"Name particular permissions using module_name","created_at":"2016-12-13T13:54:20Z","updated_at":"2016-12-13T13:54:20Z","html_url":"https://github.com/dkorhov/drupal_training/pull/10#discussion_r92171801","pull_request_url":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/dkorhov/drupal_training/pulls/comments/92171801"},"html":{"href":"https://github.com/dkorhov/drupal_training/pull/10#discussion_r92171801"},"pull_request":{"href":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10","id":97753354,"html_url":"https://github.com/dkorhov/drupal_training/pull/10","diff_url":"https://github.com/dkorhov/drupal_training/pull/10.diff","patch_url":"https://github.com/dkorhov/drupal_training/pull/10.patch","issue_url":"https://api.github.com/repos/dkorhov/drupal_training/issues/10","number":10,"state":"open","locked":false,"title":"Training task four","user":{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-13T13:44:24Z","updated_at":"2016-12-13T13:54:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96f08779ec410b7b8dc8e93cef5c05ee0747ef62","assignee":{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false},"assignees":[{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10/commits","review_comments_url":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10/comments","review_comment_url":"https://api.github.com/repos/dkorhov/drupal_training/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dkorhov/drupal_training/issues/10/comments","statuses_url":"https://api.github.com/repos/dkorhov/drupal_training/statuses/16bc81816b8b92ba3b4585985b4a0a4238726413","head":{"label":"dkorhov:training_task_four","ref":"training_task_four","sha":"16bc81816b8b92ba3b4585985b4a0a4238726413","user":{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false},"repo":{"id":75344880,"name":"drupal_training","full_name":"dkorhov/drupal_training","owner":{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkorhov/drupal_training","description":null,"fork":false,"url":"https://api.github.com/repos/dkorhov/drupal_training","forks_url":"https://api.github.com/repos/dkorhov/drupal_training/forks","keys_url":"https://api.github.com/repos/dkorhov/drupal_training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkorhov/drupal_training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkorhov/drupal_training/teams","hooks_url":"https://api.github.com/repos/dkorhov/drupal_training/hooks","issue_events_url":"https://api.github.com/repos/dkorhov/drupal_training/issues/events{/number}","events_url":"https://api.github.com/repos/dkorhov/drupal_training/events","assignees_url":"https://api.github.com/repos/dkorhov/drupal_training/assignees{/user}","branches_url":"https://api.github.com/repos/dkorhov/drupal_training/branches{/branch}","tags_url":"https://api.github.com/repos/dkorhov/drupal_training/tags","blobs_url":"https://api.github.com/repos/dkorhov/drupal_training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkorhov/drupal_training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkorhov/drupal_training/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkorhov/drupal_training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkorhov/drupal_training/statuses/{sha}","languages_url":"https://api.github.com/repos/dkorhov/drupal_training/languages","stargazers_url":"https://api.github.com/repos/dkorhov/drupal_training/stargazers","contributors_url":"https://api.github.com/repos/dkorhov/drupal_training/contributors","subscribers_url":"https://api.github.com/repos/dkorhov/drupal_training/subscribers","subscription_url":"https://api.github.com/repos/dkorhov/drupal_training/subscription","commits_url":"https://api.github.com/repos/dkorhov/drupal_training/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkorhov/drupal_training/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkorhov/drupal_training/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkorhov/drupal_training/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkorhov/drupal_training/contents/{+path}","compare_url":"https://api.github.com/repos/dkorhov/drupal_training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkorhov/drupal_training/merges","archive_url":"https://api.github.com/repos/dkorhov/drupal_training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkorhov/drupal_training/downloads","issues_url":"https://api.github.com/repos/dkorhov/drupal_training/issues{/number}","pulls_url":"https://api.github.com/repos/dkorhov/drupal_training/pulls{/number}","milestones_url":"https://api.github.com/repos/dkorhov/drupal_training/milestones{/number}","notifications_url":"https://api.github.com/repos/dkorhov/drupal_training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkorhov/drupal_training/labels{/name}","releases_url":"https://api.github.com/repos/dkorhov/drupal_training/releases{/id}","deployments_url":"https://api.github.com/repos/dkorhov/drupal_training/deployments","created_at":"2016-12-02T00:26:13Z","updated_at":"2016-12-02T12:00:02Z","pushed_at":"2016-12-13T13:44:24Z","git_url":"git://github.com/dkorhov/drupal_training.git","ssh_url":"git@github.com:dkorhov/drupal_training.git","clone_url":"https://github.com/dkorhov/drupal_training.git","svn_url":"https://github.com/dkorhov/drupal_training","homepage":null,"size":3488,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dkorhov:master","ref":"master","sha":"575c509350c47c8ea21f3db7f3b5e13b7e9b541d","user":{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false},"repo":{"id":75344880,"name":"drupal_training","full_name":"dkorhov/drupal_training","owner":{"login":"dkorhov","id":24305940,"avatar_url":"https://avatars.githubusercontent.com/u/24305940?v=3","gravatar_id":"","url":"https://api.github.com/users/dkorhov","html_url":"https://github.com/dkorhov","followers_url":"https://api.github.com/users/dkorhov/followers","following_url":"https://api.github.com/users/dkorhov/following{/other_user}","gists_url":"https://api.github.com/users/dkorhov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorhov/subscriptions","organizations_url":"https://api.github.com/users/dkorhov/orgs","repos_url":"https://api.github.com/users/dkorhov/repos","events_url":"https://api.github.com/users/dkorhov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorhov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkorhov/drupal_training","description":null,"fork":false,"url":"https://api.github.com/repos/dkorhov/drupal_training","forks_url":"https://api.github.com/repos/dkorhov/drupal_training/forks","keys_url":"https://api.github.com/repos/dkorhov/drupal_training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkorhov/drupal_training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkorhov/drupal_training/teams","hooks_url":"https://api.github.com/repos/dkorhov/drupal_training/hooks","issue_events_url":"https://api.github.com/repos/dkorhov/drupal_training/issues/events{/number}","events_url":"https://api.github.com/repos/dkorhov/drupal_training/events","assignees_url":"https://api.github.com/repos/dkorhov/drupal_training/assignees{/user}","branches_url":"https://api.github.com/repos/dkorhov/drupal_training/branches{/branch}","tags_url":"https://api.github.com/repos/dkorhov/drupal_training/tags","blobs_url":"https://api.github.com/repos/dkorhov/drupal_training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkorhov/drupal_training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkorhov/drupal_training/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkorhov/drupal_training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkorhov/drupal_training/statuses/{sha}","languages_url":"https://api.github.com/repos/dkorhov/drupal_training/languages","stargazers_url":"https://api.github.com/repos/dkorhov/drupal_training/stargazers","contributors_url":"https://api.github.com/repos/dkorhov/drupal_training/contributors","subscribers_url":"https://api.github.com/repos/dkorhov/drupal_training/subscribers","subscription_url":"https://api.github.com/repos/dkorhov/drupal_training/subscription","commits_url":"https://api.github.com/repos/dkorhov/drupal_training/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkorhov/drupal_training/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkorhov/drupal_training/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkorhov/drupal_training/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkorhov/drupal_training/contents/{+path}","compare_url":"https://api.github.com/repos/dkorhov/drupal_training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkorhov/drupal_training/merges","archive_url":"https://api.github.com/repos/dkorhov/drupal_training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkorhov/drupal_training/downloads","issues_url":"https://api.github.com/repos/dkorhov/drupal_training/issues{/number}","pulls_url":"https://api.github.com/repos/dkorhov/drupal_training/pulls{/number}","milestones_url":"https://api.github.com/repos/dkorhov/drupal_training/milestones{/number}","notifications_url":"https://api.github.com/repos/dkorhov/drupal_training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkorhov/drupal_training/labels{/name}","releases_url":"https://api.github.com/repos/dkorhov/drupal_training/releases{/id}","deployments_url":"https://api.github.com/repos/dkorhov/drupal_training/deployments","created_at":"2016-12-02T00:26:13Z","updated_at":"2016-12-02T12:00:02Z","pushed_at":"2016-12-13T13:44:24Z","git_url":"git://github.com/dkorhov/drupal_training.git","ssh_url":"git@github.com:dkorhov/drupal_training.git","clone_url":"https://github.com/dkorhov/drupal_training.git","svn_url":"https://github.com/dkorhov/drupal_training","homepage":null,"size":3488,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10"},"html":{"href":"https://github.com/dkorhov/drupal_training/pull/10"},"issue":{"href":"https://api.github.com/repos/dkorhov/drupal_training/issues/10"},"comments":{"href":"https://api.github.com/repos/dkorhov/drupal_training/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/dkorhov/drupal_training/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dkorhov/drupal_training/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/dkorhov/drupal_training/statuses/16bc81816b8b92ba3b4585985b4a0a4238726413"}}}}
{"actor":{"display_login":"dprudnikov"}}