Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Joomla! 1.5 Extension Development
  • Table Of Contents Toc
Learning Joomla! 1.5 Extension Development

Learning Joomla! 1.5 Extension Development - Second Edition

close
close
Learning Joomla! 1.5 Extension Development

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (14 chapters)
close
close
13
Index

Adding Apply

There's still one more toolbar button in our backend that needs to be powered by code in the controller the Apply button in the single view. Apply works just like Save, only the user gets redirected back to the single view for the review after the record has been saved to the database. Just as we did for the unpublish task, we can register the apply task to the save() function, and then make a few small modifications. In the restaurants.php file, make the highlighted addition to register the apply task:

$controller = new RestaurantsController();
$controller->registerTask('unpublish', 'publish');
$controller->registerTask('apply', 'save');

$controller->execute( $task );

Now, if you edit a file and click Apply, the controller will act as if you had clicked Save. To get it to behave the way we want, we just need to redirect the user back to where the review can be edited. Make the highlighted change at the end of the save...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Joomla! 1.5 Extension Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon