The application I am working on have several database fields called "active", which is boolean. However, instead of displaying "1" or "0" in views, I would like it to say "Yes" or "No".
I have the following function:
function activeFriendlyName($status)
{
if ($status == 1)
{
return "Yes";
}
else
{
return "No";
}
}
However, I am unsure where I should put this global function? Would it be the app_model.php file? In addition, how would I call this function to apply the "formatting"?