drupal modules - 'contains 1 abstract method and must therefore be declared abstract or implement the remaining methods' error when extending paragraphs plugin -
i trying implement simple plugin extends paragraphs module. want change how paragraph displayed on node page. far have:
modules/custom/paragraph_example/src/plugin/paragraphs/behavior/exampleparagraph.php
<?php namespace drupal\paragraph_example\plugin\paragraphs\behaviour; use drupal\paragraphs\paragraphsbehaviorbase; use drupal\paragraphs\paragraphsbehaviorinterface; /** * provides example paragraphs plugin implementation * @paragraphsbehavior( * id = "paragraph_example", * label = @translation("my label"), * description = @translation("my description"), * weight = 2, *) */ class exampleparagraph extends paragraphsbehaviorbase implements paragraphsbehaviorinterface { /** * {@inheritdoc} */ public function preprocess(&$variables) {} } after rebuilding cache/refreshing page error 'fatal error: class drupal\paragraph_example\plugin\paragraphs\behaviour\exampleparagraph contains 1 abstract method , must therefore declared abstract or implement remaining methods (drupal\paragraphs\paragraphsbehaviorinterface::view) in /var/www/instaport/modules/custom/paragraph_example/src/plugin/paragraphs/behavior/exampleparagraph.php on line 24'
i don't understand error or going wrong.
Comments
Post a Comment