{"action":"created","comment":{"url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/comments/66793362","id":66793362,"diff_hunk":"@@ -1,6 +1,42 @@\n <?php\n-\n /**\n  * @file\n  * Functions to support theming in the Joinup theme.\n  */\n+\n+use Drupal\\image\\Entity\\ImageStyle;\n+use \\Drupal\\file\\Entity\\File;\n+\n+/**\n+ * Implements hook_preprocess_page().\n+ */\n+function joinup_theme_preprocess_page(&$variables) {\n+  // Set page title.\n+  $request = \\Drupal::request();\n+  $route_match = \\Drupal::routeMatch();\n+  $title = \\Drupal::service('title_resolver')->getTitle($request, $route_match->getRouteObject());\n+  $variables['title'] = $title;\n+}\n+\n+/**\n+ * Implements hook_theme_preprocess_menu().\n+ */\n+function joinup_theme_preprocess_menu(&$variables) {\n+  if ($variables['menu_name'] != 'account') {\n+    return;\n+  }\n+  // Set the account logo.\n+  $account = \\Drupal::currentUser()->getAccount();\n+  $user = user_load($account->id(), TRUE);\n+  /** @var \\Drupal\\image\\Plugin\\Field\\FieldType\\ImageItem $photo */\n+  $photo = $user->get('field_user_photo')->first();\n+  $variables['profile_icon'] = '/themes/joinup/images/user-profile-icon.png';\n+  if ($photo) {\n+    $reference = $photo->getValue();\n+    /** @var \\Drupal\\file\\Entity\\File $file */\n+    $file = File::load($reference['target_id']);","path":"web/themes/joinup/joinup_theme.theme","position":38,"original_position":38,"commit_id":"c97f4eabdceea10099d3d770546f0c825f44d6d1","original_commit_id":"029af647672e4572bd6c7564432f1658672e880a","user":{"login":"sandervd","id":1673560,"avatar_url":"https://avatars.githubusercontent.com/u/1673560?v=3","gravatar_id":"","url":"https://api.github.com/users/sandervd","html_url":"https://github.com/sandervd","followers_url":"https://api.github.com/users/sandervd/followers","following_url":"https://api.github.com/users/sandervd/following{/other_user}","gists_url":"https://api.github.com/users/sandervd/gists{/gist_id}","starred_url":"https://api.github.com/users/sandervd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandervd/subscriptions","organizations_url":"https://api.github.com/users/sandervd/orgs","repos_url":"https://api.github.com/users/sandervd/repos","events_url":"https://api.github.com/users/sandervd/events{/privacy}","received_events_url":"https://api.github.com/users/sandervd/received_events","type":"User","site_admin":false},"body":"If the user doesn't have a picture $photo == FALSE, so we default to user-profile-icon.png","created_at":"2016-06-13T13:45:41Z","updated_at":"2016-06-13T13:45:41Z","html_url":"https://github.com/ec-europa/joinup-dev/pull/97#discussion_r66793362","pull_request_url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/comments/66793362"},"html":{"href":"https://github.com/ec-europa/joinup-dev/pull/97#discussion_r66793362"},"pull_request":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97"}}},"pull_request":{"url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97","id":73238798,"html_url":"https://github.com/ec-europa/joinup-dev/pull/97","diff_url":"https://github.com/ec-europa/joinup-dev/pull/97.diff","patch_url":"https://github.com/ec-europa/joinup-dev/pull/97.patch","issue_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues/97","number":97,"state":"open","locked":false,"title":"Isaicp 2510","user":{"login":"sandervd","id":1673560,"avatar_url":"https://avatars.githubusercontent.com/u/1673560?v=3","gravatar_id":"","url":"https://api.github.com/users/sandervd","html_url":"https://github.com/sandervd","followers_url":"https://api.github.com/users/sandervd/followers","following_url":"https://api.github.com/users/sandervd/following{/other_user}","gists_url":"https://api.github.com/users/sandervd/gists{/gist_id}","starred_url":"https://api.github.com/users/sandervd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandervd/subscriptions","organizations_url":"https://api.github.com/users/sandervd/orgs","repos_url":"https://api.github.com/users/sandervd/repos","events_url":"https://api.github.com/users/sandervd/events{/privacy}","received_events_url":"https://api.github.com/users/sandervd/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-09T15:49:38Z","updated_at":"2016-06-13T13:45:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48cccd05732cbab9f91ae82dfb5c9b1b668552d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97/commits","review_comments_url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97/comments","review_comment_url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues/97/comments","statuses_url":"https://api.github.com/repos/ec-europa/joinup-dev/statuses/c97f4eabdceea10099d3d770546f0c825f44d6d1","head":{"label":"ec-europa:ISAICP-2510","ref":"ISAICP-2510","sha":"c97f4eabdceea10099d3d770546f0c825f44d6d1","user":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"repo":{"id":46046597,"name":"joinup-dev","full_name":"ec-europa/joinup-dev","owner":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ec-europa/joinup-dev","description":"Joinup Drupal 8 development","fork":false,"url":"https://api.github.com/repos/ec-europa/joinup-dev","forks_url":"https://api.github.com/repos/ec-europa/joinup-dev/forks","keys_url":"https://api.github.com/repos/ec-europa/joinup-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ec-europa/joinup-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ec-europa/joinup-dev/teams","hooks_url":"https://api.github.com/repos/ec-europa/joinup-dev/hooks","issue_events_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues/events{/number}","events_url":"https://api.github.com/repos/ec-europa/joinup-dev/events","assignees_url":"https://api.github.com/repos/ec-europa/joinup-dev/assignees{/user}","branches_url":"https://api.github.com/repos/ec-europa/joinup-dev/branches{/branch}","tags_url":"https://api.github.com/repos/ec-europa/joinup-dev/tags","blobs_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ec-europa/joinup-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/ec-europa/joinup-dev/languages","stargazers_url":"https://api.github.com/repos/ec-europa/joinup-dev/stargazers","contributors_url":"https://api.github.com/repos/ec-europa/joinup-dev/contributors","subscribers_url":"https://api.github.com/repos/ec-europa/joinup-dev/subscribers","subscription_url":"https://api.github.com/repos/ec-europa/joinup-dev/subscription","commits_url":"https://api.github.com/repos/ec-europa/joinup-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/ec-europa/joinup-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/ec-europa/joinup-dev/contents/{+path}","compare_url":"https://api.github.com/repos/ec-europa/joinup-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ec-europa/joinup-dev/merges","archive_url":"https://api.github.com/repos/ec-europa/joinup-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ec-europa/joinup-dev/downloads","issues_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues{/number}","pulls_url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/ec-europa/joinup-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/ec-europa/joinup-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ec-europa/joinup-dev/labels{/name}","releases_url":"https://api.github.com/repos/ec-europa/joinup-dev/releases{/id}","deployments_url":"https://api.github.com/repos/ec-europa/joinup-dev/deployments","created_at":"2015-11-12T10:46:34Z","updated_at":"2016-06-10T15:05:37Z","pushed_at":"2016-06-13T13:17:43Z","git_url":"git://github.com/ec-europa/joinup-dev.git","ssh_url":"git@github.com:ec-europa/joinup-dev.git","clone_url":"https://github.com/ec-europa/joinup-dev.git","svn_url":"https://github.com/ec-europa/joinup-dev","homepage":null,"size":3726,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":5,"default_branch":"develop"}},"base":{"label":"ec-europa:develop","ref":"develop","sha":"118b9d650f6b7f757d56bea6c2ca284766c2a77e","user":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"repo":{"id":46046597,"name":"joinup-dev","full_name":"ec-europa/joinup-dev","owner":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ec-europa/joinup-dev","description":"Joinup Drupal 8 development","fork":false,"url":"https://api.github.com/repos/ec-europa/joinup-dev","forks_url":"https://api.github.com/repos/ec-europa/joinup-dev/forks","keys_url":"https://api.github.com/repos/ec-europa/joinup-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ec-europa/joinup-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ec-europa/joinup-dev/teams","hooks_url":"https://api.github.com/repos/ec-europa/joinup-dev/hooks","issue_events_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues/events{/number}","events_url":"https://api.github.com/repos/ec-europa/joinup-dev/events","assignees_url":"https://api.github.com/repos/ec-europa/joinup-dev/assignees{/user}","branches_url":"https://api.github.com/repos/ec-europa/joinup-dev/branches{/branch}","tags_url":"https://api.github.com/repos/ec-europa/joinup-dev/tags","blobs_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ec-europa/joinup-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/ec-europa/joinup-dev/languages","stargazers_url":"https://api.github.com/repos/ec-europa/joinup-dev/stargazers","contributors_url":"https://api.github.com/repos/ec-europa/joinup-dev/contributors","subscribers_url":"https://api.github.com/repos/ec-europa/joinup-dev/subscribers","subscription_url":"https://api.github.com/repos/ec-europa/joinup-dev/subscription","commits_url":"https://api.github.com/repos/ec-europa/joinup-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/ec-europa/joinup-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/ec-europa/joinup-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/ec-europa/joinup-dev/contents/{+path}","compare_url":"https://api.github.com/repos/ec-europa/joinup-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ec-europa/joinup-dev/merges","archive_url":"https://api.github.com/repos/ec-europa/joinup-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ec-europa/joinup-dev/downloads","issues_url":"https://api.github.com/repos/ec-europa/joinup-dev/issues{/number}","pulls_url":"https://api.github.com/repos/ec-europa/joinup-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/ec-europa/joinup-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/ec-europa/joinup-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ec-europa/joinup-dev/labels{/name}","releases_url":"https://api.github.com/repos/ec-europa/joinup-dev/releases{/id}","deployments_url":"https://api.github.com/repos/ec-europa/joinup-dev/deployments","created_at":"2015-11-12T10:46:34Z","updated_at":"2016-06-10T15:05:37Z","pushed_at":"2016-06-13T13:17:43Z","git_url":"git://github.com/ec-europa/joinup-dev.git","ssh_url":"git@github.com:ec-europa/joinup-dev.git","clone_url":"https://github.com/ec-europa/joinup-dev.git","svn_url":"https://github.com/ec-europa/joinup-dev","homepage":null,"size":3726,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97"},"html":{"href":"https://github.com/ec-europa/joinup-dev/pull/97"},"issue":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/issues/97"},"comments":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/ec-europa/joinup-dev/statuses/c97f4eabdceea10099d3d770546f0c825f44d6d1"}}}}
{"actor":{"display_login":"sandervd"}}