How to add a New Task to your Joomla 3 Component?

> We’re creating a shout task, please add a function named after your task from your component’s controller class,

> We need to create a function named shout() and add it to our controller’s class. Below is our controller.php file with the new code we added to it highlighted in red

<?php // No direct access to this file defined('_JEXEC') or die('Restricted access'); // import Joomla controller library jimport('joomla.application.component.controller'); /** * Hello World Component Controller */ class HelloWorldController extends JControllerLegacy { function shout() { echo "<p>THIS IS ME SHOUTING!</p>"; } }
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Enable Two Factor Authentication in Joomla 3.5?

> Please login to Joomla admin dashboard > You will have a notification, please click on...

How to Change an Article Category in Joomla 3.5?

> Please login to your Joomla 3.5 Admin Dashboard > Please go to Content > click...

How to Create a New Category in Joomla 3.5?

> Please login to Joomla 3.5 Admin Dashboard > Please click on the Content > Catagory...

How to Create a New Article in Joomla 3.5?

> Please login to your Joomla 3.5 Admin Dashboard > Please Click Content > Articles...

How to Log in to your Joomla 3.5 Dashboard?

> Please navigate your site with "/administrator", for e.g. domain.com/administrator >...

Powered by WHMCompleteSolution