autoEmbed() public method

Embeds known/available services into the given text.
public autoEmbed ( string $body = null ) : string
$body string
return string
Ejemplo n.º 1
0
 public function setTextAttribute($text)
 {
     $text = str_replace(' ', ' ', $text);
     if ($this->slotname === 'standfirst') {
         $siteText = $text = strip_tags($text);
     } else {
         $embera = new Embera();
         $text = Str::makeInternalLinksRelative($text);
         $siteText = Str::StorifyEmbed($embera->autoEmbed($text));
     }
     $this->attributes['text'] = $text;
     $this->attributes['site_text'] = $siteText;
 }
Ejemplo n.º 2
0
 public function getVideoAttribute()
 {
     $embera = new Embera(array('params' => array('width' => 800, 'height' => 420)));
     return $embera->autoEmbed($this->video_url);
 }