Issue #3347474: Fix Icon patch for Type Tray with the Origin URL (scheme and HTTP host) of the site
3 unresolved threads
Closes #3347474
Merge request reports
Activity
added 1 commit
added 6 commits
-
2cc450b8...6c13ee10 - 5 commits from branch
project:1.0.x
- e05f6af1 - Issue #3347474: Fix Icon patch for Type Tray with the Origin URL (scheme and HTTP host) of the site
-
2cc450b8...6c13ee10 - 5 commits from branch
183 183 ])->toString(); 184 184 $favorite_link_action = 'add'; 185 185 } 186 187 /** @var \Symfony\Component\HttpFoundation\Request $origin_url */ 183 183 ])->toString(); 184 184 $favorite_link_action = 'add'; 185 185 } 186 187 /** @var \Symfony\Component\HttpFoundation\Request $origin_url */ 188 $origin_url = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl(); 183 183 ])->toString(); 184 184 $favorite_link_action = 'add'; 185 185 } 186 187 /** @var \Symfony\Component\HttpFoundation\Request $origin_url */ 188 $origin_url = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl(); 189 $origin_url_type_tray = $origin_url . '/' . $this->moduleList->getPath('type_tray'); Just for clarity, can we maybe define here directly the default URL we want to use? So instead of
$origin_url_type_tray = $origin_url . '/' . $this->moduleList->getPath('type_tray');
we can use
$default_thumbnail_url = $origin_url . '/' . $this->moduleList->getPath('type_tray') . static::TYPE_TRAY_DEFAULT_THUMBNAIL_PATH;
and then just use
$default_thumbnail_url
as the fallback in the ternary check down below? I think this makes things a bit clearer. Thanks!
Please register or sign in to reply