public function SocialEmbedUrlFilter::process in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.2 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.3 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.4 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.5 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.6 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.7 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 8.8 modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 10.3.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 10.0.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 10.1.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
- 10.2.x modules/social_features/social_embed/src/Plugin/Filter/SocialEmbedUrlFilter.php \Drupal\social_embed\Plugin\Filter\SocialEmbedUrlFilter::process()
Performs the filter processing.
Parameters
string $text: The text string to be filtered.
string $langcode: The language code of the text to be filtered.
Return value
\Drupal\filter\FilterProcessResult The filtered text, wrapped in a FilterProcessResult object, and possibly with associated assets, cacheability metadata and placeholders.
Overrides ConvertUrlToEmbedFilter::process
See also
\Drupal\filter\FilterProcessResult
File
- modules/
social_features/ social_embed/ src/ Plugin/ Filter/ SocialEmbedUrlFilter.php, line 34
Class
- SocialEmbedUrlFilter
- Provides a filter to display embedded entities based on data attributes.
Namespace
Drupal\social_embed\Plugin\FilterCode
public function process($text, $langcode) {
// Check for whitelisted URL.
if ($this
->whiteList($text)) {
return parent::process($text, $langcode);
}
// Not whitelisted is return the string as is.
return new FilterProcessResult($text);
}