Hello I'm the demo plugin with id $plugin_id\n";
print "Query backend plugin for function try
\n";
// the command to be executed in the backend plugin
$command = 'demoplugin::try';
// two scalar values
$colour1 = '#72e3fa';
$colour2 = '#2a6f99';
// one array
$colours = array ( '#12af7d', '#56fc7b');
// prepare arguments
$opts = array();
$opts['colour1'] = $colour1;
$opts['colour2'] = $colour2;
$opts['colours'] = $colours;
// call command in backened plugin
$out_list = nfsend_query($command, $opts);
// get result
if ( !is_array($out_list) ) {
SetMessage('error', "Error calling backend plugin");
return FALSE;
}
$string = $out_list['string'];
print "Backend reported: $string
\n";
print "
\n";
} // End of demoplugin_Run
?>