Added a function to get the agent alias using a module id

This commit is contained in:
Alejandro Gallardo Escobar 2017-02-20 18:50:28 +01:00
parent 354377a56a
commit e53d75d98d
1 changed files with 12 additions and 0 deletions

View File

@ -1023,6 +1023,18 @@ function modules_get_agentmodule_agent_name ($id_agentmodule) {
return (string) agents_get_name (modules_get_agentmodule_agent ($id_agentmodule)); return (string) agents_get_name (modules_get_agentmodule_agent ($id_agentmodule));
} }
/**
* Get agent alias of an agent module.
*
* @param int $id_agente_modulo Agent module id.
*
* @return string The alias of the given agent module.
*/
function modules_get_agentmodule_agent_alias ($id_agentmodule) {
// Since this is a helper function we don't need to do casting
return (string) agents_get_alias (modules_get_agentmodule_agent ($id_agentmodule));
}
/** /**
* Get the module name of an agent module. * Get the module name of an agent module.
* *