A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
|
- <?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]";
- }
- }
|