You can create your own view helper
libraray--App>View>Helper>PlainTextElemet.php
Create a folder in your library folder that name is App
so a folder that name is View so in View create Helper Folder so in Helper folder create
a class with PlainTextElement name same following
class App_View_Helper_PlainTextElement extends Zend_View_Helper_FormElement {
public function PlainTextElement($name, $value = null, $attribs = null) {
$info = $this->_getInfo($name, $value, $attribs);
extract($info); // name, value, attribs, options, listsep, disable
if (null === $value) {$value = $name;}
return $value;
}
}
Sonra libray aynı yukarıda bir sınıf oluşturmak App> Form> Eleman> PlainText.php
Ve bu sınıfta folowing kod koymak
class App_Form_Element_PlainText extends Zend_Form_Element_Xhtml {
public $helper='PlainTextElement';
public function isValid($value){
return true;
}
}
Şimdi formdaki sizin gibi her html kodunu oluşturabilirsiniz:
$someValue = '<div id="wmd-button-bar" class="wmd-panel"></div>';
$this->addElement(new App_Form_Element_PlainText('pliantext1', array(
'value'=>$someValue,
)));
Lütfen application.ini unutmak etmeyin çok satırları bitiminden sonraki ekle:
autoloaderNamespaces.app = "App_"
resources.view.helperPath.App_View_Helper="App/View/Helper"