I am new to Drupal web development. I have already used Wordpress platform by building a custom plugin to write custom php functions, and calling the function from a custom page was easy.
example:
<?php
function givenumber(){
return 50;
}
?>;
Which I call by using:
<?php echo givenumber(); ?>
- How can I achieve similar with Drupal 8?
- Do I need to create a custom module for writing the custom php functions?
- How do I call a function from a custom page?
Please help.