A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- <?php
-
- namespace App\BbCode\Tag;
-
- use Knockout\BbCode\Tag\TagInterface;
- use Knockout\BbCode\Tokenizer\Tag as TokenTag;
-
- class Twitter implements TagInterface
- {
-
- public function format(TokenTag $tokenTag): string
- {
- $url = $tokenTag->getText();
- return "<a href=\"{$url}\" target=\"_blank\">[Twitter Embed]</a>";
- }
-
- public function getName(): string
- {
- return 'twitter';
- }
-
- public function getOriginalText(TokenTag $tokenTag) : string
- {
- return "[twitter]{$tokenTag->getText()}[/twitter]";
- }
- }
|