i have some piece of reusable functions that i want to use in my controller to manipulate the ajax data in my controller. since the controller does not have a view (because it is AJAX). i want to know where does the below method rightfully belong in a Zend Framework
function blockUnblock($value, $id) {
$image = ($value == 0) ? 'tick.png' : 'tock.png';
$alt = ($value == 0) ? 'Yes' : 'No';
$src = '<a class="toggle" href="#toggle">';
$src .= '<img src = "/css/images/'.$image.'" alt = "'.$alt.'" data-id = "'.$id.'" data-block = "'.$value.'"/>';
$src .= '</a>';
return $src;
}
i need to reuse this method across various controllers and actions.
which helper method does it belong to?