29 lines
624 B
PHP
Raw Normal View History

2011-04-19 15:59:50 +00:00
<?php
Class Zend_View_Helper_TrueLabel extends Zend_View_Helper_Abstract
{
public function __construct()
{
}
public function TrueLabel($list, $name)
{
try {
return (self::GetTrueLabel($list, $name));
} catch (Exception $e) {
echo 'Aucun label : ' . $e;
}
}
private function GetTrueLabel($list, $name)
{
if(isset($list)) {
foreach ($list as $nameLabel => $label)
{
if ($nameLabel == $name)
return ($label);
}
}
return ($name);
}
}