protected function SocialContentBlockLandingPageContentBuilder::getLink in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_content_block/modules/social_content_block_landing_page/src/Service/SocialContentBlockLandingPageContentBuilder.php \Drupal\social_content_block_landing_page\Service\SocialContentBlockLandingPageContentBuilder::getLink()
- 10.0.x modules/social_features/social_content_block/modules/social_content_block_landing_page/src/Service/SocialContentBlockLandingPageContentBuilder.php \Drupal\social_content_block_landing_page\Service\SocialContentBlockLandingPageContentBuilder::getLink()
- 10.1.x modules/social_features/social_content_block/modules/social_content_block_landing_page/src/Service/SocialContentBlockLandingPageContentBuilder.php \Drupal\social_content_block_landing_page\Service\SocialContentBlockLandingPageContentBuilder::getLink()
- 10.2.x modules/social_features/social_content_block/modules/social_content_block_landing_page/src/Service/SocialContentBlockLandingPageContentBuilder.php \Drupal\social_content_block_landing_page\Service\SocialContentBlockLandingPageContentBuilder::getLink()
Function to generate the read more link.
Parameters
\Drupal\block_content\BlockContentInterface $block_content: The block content where we get the settings from.
Return value
array The read more link render array.
Overrides ContentBuilder::getLink
File
- modules/
social_features/ social_content_block/ modules/ social_content_block_landing_page/ src/ Service/ SocialContentBlockLandingPageContentBuilder.php, line 73
Class
- SocialContentBlockLandingPageContentBuilder
- Class SocialContentBlockLandingPageContentBuilder.
Namespace
Drupal\social_content_block_landing_page\ServiceCode
protected function getLink(BlockContentInterface $block_content) : array {
if ($link = parent::getLink($block_content)) {
$link['#url']
->setOption('attributes', []);
$link = [
'#type' => 'container',
'#attributes' => [
'class' => [
'card__link',
],
],
'link' => $link,
];
}
return $link;
}