In search of the elusive goto0 -- destination drop down implementation

I am looking for the implementation of the drop down that several modules use for selecting destinations. The label reference is “goto0” – I see it used in several modules but I have not found where it is implemented. I need to see how it prepares the list of potential destinations to implement something similar for fwconsole commands in the allowlist module.

Any pointers?

Thanks!

Take a look at libraries/BMO/Destinations.class.php.

Try this little PHP script on the command line to see a structured list.

<?php
$bootstrap_settings['freepbx_auth'] = false;
require_once '/etc/freepbx.conf';
print_r(FreePBX::Destinations()->getAllDestinations());
?>
2 Likes
<?php echo drawselects($post_dest,0); ?>

2nd arg is the goto number Above goto0 below goto1

<?php echo drawselects($post_dest,1); ?>

form processing…

Yeah I saw that, but I’m trying to find the code that actually gathers up the list and package the information for display. My aim is to replicate it for a console command to select a destination.

The function

1 Like

Perfect, thanks! I’ve got some reading to do. That first comment line is a classic, and quite apropos.

Bill, James,

Thank you both for your notes – that put me on the right track.

Mitch

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.