X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd8%2Fplugin%2Ffilter.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd8%2Fplugin%2Ffilter.twig;h=d080e2bc675a9ad61308d1bb52388a1ca4309e06;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/plugin/filter.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/plugin/filter.twig new file mode 100644 index 000000000..d080e2bc6 --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d8/plugin/filter.twig @@ -0,0 +1,54 @@ + 'textfield', + '#title' => $this->t('Example'), + '#default_value' => $this->settings['example'], + '#description' => $this->t('Description of the setting.'), + ]; + return $form; + } + + /** + * {@inheritdoc} + */ + public function process($text, $langcode) { + // @DCG Process text here. + $example = $this->settings['example']; + $text = str_replace($example, "$example", $text); + return new FilterProcessResult($text); + } + + /** + * {@inheritdoc} + */ + public function tips($long = FALSE) { + return $this->t('Some filter tips here.'); + } + +}