b1b1dfd7015a31a64cf4259d6f8e556ebeddbbcb
[yaffs-website] / vendor / drupal / console / templates / module / src / Plugin / ImageEffect / imageeffect.php.twig
1 {% extends "base/class.php.twig" %}
2
3 {% block file_path %}
4 \Drupal\{{module}}\Plugin\ImageEffect\{{class_name}}.
5 {% endblock %}
6
7 {% block namespace_class %}
8 namespace Drupal\{{module}}\Plugin\ImageEffect;
9 {% endblock %}
10
11 {% block use_class %}
12 use Drupal\Core\Image\ImageInterface;
13 use Drupal\image\ImageEffectBase;
14 {% endblock %}
15
16 {% block class_declaration %}
17 /**
18  * Provides a '{{class_name}}' image effect.
19  *
20  * @ImageEffect(
21  *  id = "{{plugin_id}}",
22  *  label = @Translation("{{label}}"),
23  *  description = @Translation("{{description}}")
24  * )
25  */
26 class {{ class_name }} extends ImageEffectBase {% endblock %}
27 {% block class_methods %}
28   /**
29    * {@inheritdoc}
30    */
31   public function applyEffect(ImageInterface $image) {
32     // Implement Image Effect.
33     return imagefilter($image->getToolkit()->getResource());
34   }
35 {% endblock %}