New answers tagged

0 votes

JRequest Method in Joomla 4

This is some of the current code inside my controller: function add() { if(JRequest::checkToken( 'get' )) { JRequest::checkToken( 'get' ) or die( 'Invalid Token' ); } else { ...
user avatar
1 vote

JRequest Method in Joomla 4

Use Joomla\Input\Input class. Instance relevant to the current request can be accessed through the application: use Joomla\CMS\Factory; $controller->execute(Factory::getApplication()->getInput()...
user avatar
  • 8,222
0 votes

How can I sort an unordered list alphabetically by class with JavaScript or PHP?

Use usort() to sort $legend->markers array: usort( $legend->markers, static fn ($a, $b) => $a->locationtype_id <=> $b->locationtype_id );
user avatar
  • 8,222
0 votes

How can I sort an unordered list alphabetically by class with JavaScript or PHP?

I solved it with some vanilla JavaScript. I'd still like to know how it could be done in PHP as the JavaScript runs after page load and on a slow page load the resort might be visible to the naked eye....
user avatar
  • 161

Top 50 recent answers are included