19 lines
505 B
PHP

<?php
class Zend_View_Helper_Editable extends Zend_View_Helper_Abstract
{
public function Editable($name, $value, $category)
{
$class = 'editable-change';
if ( null === $value ) {
$value = $name;
$class = 'editable';
}
if ( !empty($class) ) {
$class = 'class="'.$class.' '.$category.'"';
}
$html = '<span id="'.$name.'" '.$class.'>';
$html.= $value;
$html.= '</span>';
return $html;
}
}