private function EntityConfigSettingsForm::getContentTypePreviewImageLink in Acquia Content Hub 8
Get Content Type preview image link.
Parameters
string $bundle_id: Bundle Id.
Return value
\Drupal\Core\GeneratedLink Link object to the node page and its preview image tab.
1 call to EntityConfigSettingsForm::getContentTypePreviewImageLink()
- EntityConfigSettingsForm::buildEntitiesBundleForm in src/
Form/ EntityConfigSettingsForm.php - Build entities bundle form.
File
- src/
Form/ EntityConfigSettingsForm.php, line 260
Class
- EntityConfigSettingsForm
- Defines the form to configure the entity types and bundles to be exported.
Namespace
Drupal\acquia_contenthub\FormCode
private function getContentTypePreviewImageLink($bundle_id) {
$link_text = $this
->t('preview image');
$link_attributes = [
'attributes' => [
'target' => '_blank',
],
'fragment' => 'edit-acquia-contenthub',
];
$url = Url::fromRoute('entity.node_type.edit_form', [
'node_type' => $bundle_id,
], $link_attributes);
$link = Link::fromTextAndUrl($link_text, $url)
->toString();
return $link;
}