本文整理汇总了PHP中Zend_Form_Element_Submit::getDecorator方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Submit::getDecorator方法的具体用法?PHP Zend_Form_Element_Submit::getDecorator怎么用?PHP Zend_Form_Element_Submit::getDecorator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Submit
的用法示例。
在下文中一共展示了Zend_Form_Element_Submit::getDecorator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createToolbar
/**
* Cria a toolbar.
* @param Boolean $save define se irá aparecer o botão padrão Salvar.
* @param Boolean $saveClose Botão para salvar e fechar
* @param Boolean $printForm Botão para imprimir
* @param Boolean $deleteForm Botão para deletar
* @param Boolean $clearForm Botão limpar dados de um formulário
* @param Boolean $includeForm Botão para incluir
* @param Boolean $editForm Botão para editar
* @param Boolean $backForm Botão para voltar
* @param Boolean $execute Botão para executar processo [GAMBI]
* @param Boolean $returnPendency Botão para processar dados [GAMBI]
* @param Boolean $processData Botão para processar dados [GAMBI]
* @param Boolean $block Botão para bloquear recursos [GAMBI]
* @param Boolean $disable Botão para desativar recursos [GAMBI]
*/
public function createToolbar($save = false, $saveClose = false, $printForm = false, $deleteForm = false, $clearForm = false, $includeForm = false, $editForm = false, $backForm = false, $execute = false, $returnPendency = false, $processData = false, $block = false, $disable = false, array $params = null)
{
$elementsList = array();
$elementsNameList = array();
if ($save) {
$saveForm = new Zend_Form_Element_Submit('saveForm');
$saveForm->setLabel('Salvar');
$saveForm->setAttrib('class', 'save');
$saveForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li'))));
$elementsList[] = $saveForm;
$elementsNameList[] = "saveForm";
}
if ($saveClose) {
$saveCloseForm = new Zend_Form_Element_Submit('saveCloseForm');
// $saveCloseForm = new Zend_Form_Element_Hidden('saveCloseForm');
$saveCloseForm->setLabel('Salvar/Fechar');
$saveCloseForm->setAttrib('class', 'save_close');
// $saveCloseForm->setDescription('<a href="" class="save_close" id="save_close">Salvar/Fechar</a>');
$saveCloseForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li'))));
$saveCloseForm->getDecorator('description')->setOption('escape', false);
$elementsList[] = $saveCloseForm;
$elementsNameList[] = "saveCloseForm";
}
if ($execute) {
$execute = new Zend_Form_Element_Hidden('execute');
$execute->setDescription('<a href="" id="execute" class="execute">Executar</a>');
$execute->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'execute'))));
$execute->getDecorator('description')->setOption('escape', false);
$elementsList[] = $execute;
$elementsNameList[] = "execute";
}
if ($returnPendency) {
$returnPendency = new Zend_Form_Element_Hidden('returnPendency');
$returnPendency->setDescription('<a href="" id="rtPendency" class="back">Retornar pendência</a>');
$returnPendency->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'back'))));
$returnPendency->getDecorator('description')->setOption('escape', false);
$elementsList[] = $returnPendency;
$elementsNameList[] = "returnPendency";
}
if ($processData) {
$processData = new Zend_Form_Element_Hidden('processData');
$processData->setDescription('<a href="" id="processData" class="process">Dados do processo</a>');
$processData->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'process'))));
$processData->getDecorator('description')->setOption('escape', false);
$elementsList[] = $processData;
$elementsNameList[] = "processData";
}
if ($clearForm) {
$clearForm = new Zend_Form_Element_Hidden('clearForm');
$clearForm->setDescription('<a href="" id="clear_btn" class="clean">Limpar</a>');
$clearForm->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'clear'))));
$clearForm->getDecorator('description')->setOption('escape', false);
$elementsList[] = $clearForm;
$elementsNameList[] = "clearForm";
}
if ($includeForm) {
$includeForm = new Zend_Form_Element_Hidden('includeForm');
$includeForm->setDescription('<a href="#" id="include_btn" class="include">Incluir</a>');
$includeForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'include'))));
$includeForm->getDecorator('description')->setOption('escape', false);
$elementsList[] = $includeForm;
$elementsNameList[] = "includeForm";
}
if ($editForm) {
$editForm = new Zend_Form_Element_Hidden('editForm');
$editForm->setDescription('<a href="#" id="edit_btn" class="edit">Editar</a>');
$editForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'edit'))));
$editForm->getDecorator('description')->setOption('escape', false);
$elementsList[] = $editForm;
$elementsNameList[] = "editForm";
}
if ($deleteForm) {
$deleteForm = new Zend_Form_Element_Hidden('deleteForm');
$deleteForm->setDescription('<a href="" id="delete_btn" class="delete">Excluir</a>');
$deleteForm->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'delete'))));
$deleteForm->getDecorator('description')->setOption('escape', false);
$elementsList[] = $deleteForm;
$elementsNameList[] = "deleteForm";
}
if ($block) {
$block = new Zend_Form_Element_Hidden('blockForm');
$block->setDescription('<a href="" id="block_btn" class="block">Bloquear/Desbloquear</a>');
$block->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'block'))));
$block->getDecorator('description')->setOption('escape', false);
//.........这里部分代码省略.........