当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Button::setIgnore方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Button::setIgnore方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Button::setIgnore方法的具体用法?PHP Zend_Form_Element_Button::setIgnore怎么用?PHP Zend_Form_Element_Button::setIgnore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Button的用法示例。


在下文中一共展示了Zend_Form_Element_Button::setIgnore方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oRobots = new Zend_Form_Element_Select("site_seo_robots_id");
     $oRobots->setLabel("Tryb indeksowania przez roboty:");
     $oRobots->setRequired(FALSE);
     $oRobots->addMultiOptions($this->_aAllSiteSeoRobots);
     $oRobots->setValue(1);
     $this->addElement($oRobots);
     $oSeoTagTitle = new Zend_Form_Element_Textarea("head_title");
     $oSeoTagTitle->setLabel("Tytuł strony (meta titile):")->setFilters($this->_aFilters);
     $oSeoTagTitle->setRequired(FALSE);
     $this->addElement($oSeoTagTitle);
     $oAdditionalSeoTagKeywords = new Zend_Form_Element_Text("additional_seo_tag_keywords");
     $oAdditionalSeoTagKeywords->setLabel("Dodaj nowe słowo kluczowe:");
     $oAdditionalSeoTagKeywords->setRequired(FALSE);
     $oAdditionalSeoTagKeywords->addValidator(new Zend_Validate_StringLength(array("min" => 1, "max" => 45)));
     $oAdditionalSeoTagKeywords->setAttrib("class", "valid");
     $this->addElement($oAdditionalSeoTagKeywords);
     $oAddAdditionalSeoTagKeywords = new Zend_Form_Element_Button("add_additional_seo_tag_keywords");
     $oAddAdditionalSeoTagKeywords->setLabel("Dodaj");
     $oAddAdditionalSeoTagKeywords->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oAddAdditionalSeoTagKeywords);
     $oSeoTagKeywords = new Zend_Form_Element_Multiselect("keywords");
     $oSeoTagKeywords->addMultiOptions($this->_aAllSiteSeoKeywords);
     $oSeoTagKeywords->setRequired(FALSE);
     $oSeoTagKeywords->setLabel("Słowa kluczowe (meta keywords):");
     $oSeoTagKeywords->setAttrib("class", "chosen");
     $this->addElement($oSeoTagKeywords);
     $oSeoTagDescription = new Zend_Form_Element_Textarea("description");
     $oSeoTagDescription->setLabel("Opis strony (meta description):")->setFilters($this->_aFilters);
     $oSeoTagDescription->setRequired(FALSE);
     $this->addElement($oSeoTagDescription);
     $this->addElement("hash", "csrf_token", array("ignore" => false, "timeout" => 7200));
     $this->getElement("csrf_token")->removeDecorator("Label");
     $oSubmit = $this->createElement("submit", "submit");
     $oSubmit->setLabel("Zapisz");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/siteseo.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:54,代码来源:SiteSeo.php

示例2: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oNotificationId = new Zend_Form_Element_Hidden("notification_id");
     $oNotificationId->setValue(0);
     $oNotificationId->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oNotificationId);
     $oMailSessionId = new Zend_Form_Element_Hidden("mail_session_id");
     $oMailSessionId->setValue(0);
     $oMailSessionId->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oMailSessionId);
     $oMessage = new Zend_Form_Element_Textarea("message");
     $oMessage->setFilters($this->_aFilters);
     $oMessage->setRequired(FALSE);
     $oMessage->setAttrib("class", "ckeditor");
     $oMessage->setLabel("Wiadomość");
     $this->addElement($oMessage);
     $this->addFileIdElement();
     $oAddFile = new Zend_Form_Element_Button("add_file_button");
     $oAddFile->setLabel("Dodaj załącznik");
     $oAddFile->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oAddFile);
     $this->addElement("hash", "csrf_token", array("ignore" => false, "timeout" => 7200));
     $this->getElement("csrf_token")->removeDecorator("Label");
     $oSubmit = new Zend_Form_Element_Submit("submit_send_message");
     $oSubmit->setLabel("Wyślij wiadomość");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/mailnotification.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:43,代码来源:MailNotification.php

示例3: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oNewsEditId = new Zend_Form_Element_Hidden("news_edit_id");
     $oNewsEditId->setValue(0);
     $oNewsEditId->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oNewsEditId);
     $oTranslation = new Zend_Form_Element_Select("translation");
     $oTranslation->setLabel("Tłumaczenie:");
     $oTranslation->setRequired(TRUE)->setAttrib("class", "valid");
     $oTranslation->addMultiOptions($this->_aAllLang);
     $this->addElement($oTranslation);
     $oImagePreview = new Zend_Form_Element_Hidden("image_preview");
     $oImagePreview->setValue(0);
     $oImagePreview->setRequired(FALSE)->removeDecorator("Label");
     $this->addElement($oImagePreview);
     $oImageId = new Zend_Form_Element_Select("image_id");
     $oImageId->setLabel("Zdjęcie:")->setFilters($this->_aFilters);
     $oImageId->setRequired(FALSE);
     $oImageId->addMultiOptions($this->_aAllImage);
     $this->addElement($oImageId);
     $oCreatedDate = new Zend_Form_Element_Text("created_date");
     $oCreatedDate->setLabel("Data utworzenia:");
     $oCreatedDate->setRequired(TRUE);
     $oCreatedDate->setAttrib("class", "valid");
     $this->addElement($oCreatedDate);
     $oName = new Zend_Form_Element_Text("news_title");
     $oName->setLabel("Tytuł:");
     $oName->addValidator(new Zend_Validate_StringLength(array("min" => 3, "max" => 255)));
     $oName->setRequired(TRUE)->setAttrib("class", "valid");
     $this->addElement($oName);
     $oContent = new Zend_Form_Element_Textarea("news_content");
     $oContent->setLabel("Treść:");
     $oContent->setRequired(FALSE);
     $oContent->setAttrib("class", "ckeditor");
     $this->addElement($oContent);
     $oAdditionalCategoryTag = new Zend_Form_Element_Text("additional_category_tag");
     $oAdditionalCategoryTag->setLabel("Dodaj nowe tagi:");
     $oAdditionalCategoryTag->setRequired(FALSE);
     $oAdditionalCategoryTag->addValidator(new Zend_Validate_StringLength(array("min" => 1, "max" => 45)));
     $oAdditionalCategoryTag->setAttrib("class", "valid");
     $this->addElement($oAdditionalCategoryTag);
     $oAddAdditionalCategoryTag = new Zend_Form_Element_Button("add_additional_category_tag");
     $oAddAdditionalCategoryTag->setLabel("Dodaj");
     $oAddAdditionalCategoryTag->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oAddAdditionalCategoryTag);
     $oCategoryTag = new Zend_Form_Element_Multiselect("category_tag");
     $oCategoryTag->addMultiOptions(array());
     $oCategoryTag->setRequired(FALSE);
     $oCategoryTag->setLabel("Tagi:");
     $oCategoryTag->setAttrib("class", "chosen");
     $this->addElement($oCategoryTag);
     $this->addElement("hash", "csrf_token", array("ignore" => false, "timeout" => 7200));
     $this->getElement("csrf_token")->removeDecorator("Label");
     $oSubmit = $this->createElement("submit", "submit");
     $oSubmit->setLabel("Zapisz");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/_defaultform.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:73,代码来源:News.php

示例4: startForm


//.........这里部分代码省略.........
             } else {
                 $invisible = '';
             }
             $criteria = new Zend_Form_Element_Select("sp_criteria_field_" . $i . "_" . $j);
             $criteria->setAttrib('class', 'input_select sp_input_select' . $invisible)->setValue('Select criteria')->setDecorators(array('viewHelper'))->setMultiOptions($this->getCriteriaOptions());
             if ($i != 0 && !isset($criteriaKeys[$i])) {
                 $criteria->setAttrib('disabled', 'disabled');
             }
             if (isset($criteriaKeys[$i])) {
                 $criteriaType = $this->criteriaTypes[$storedCrit["crit"][$criteriaKeys[$i]][$j]["criteria"]];
                 $criteria->setValue($storedCrit["crit"][$criteriaKeys[$i]][$j]["criteria"]);
             }
             $this->addElement($criteria);
             /****************** MODIFIER ***********/
             $criteriaModifers = new Zend_Form_Element_Select("sp_criteria_modifier_" . $i . "_" . $j);
             $criteriaModifers->setValue('Select modifier')->setAttrib('class', 'input_select sp_input_select')->setDecorators(array('viewHelper'));
             if ($i != 0 && !isset($criteriaKeys[$i])) {
                 $criteriaModifers->setAttrib('disabled', 'disabled');
             }
             if (isset($criteriaKeys[$i])) {
                 if ($criteriaType == "s") {
                     $criteriaModifers->setMultiOptions($this->getStringCriteriaOptions());
                 } else {
                     $criteriaModifers->setMultiOptions($this->getNumericCriteriaOptions());
                 }
                 $criteriaModifers->setValue($storedCrit["crit"][$criteriaKeys[$i]][$j]["modifier"]);
             } else {
                 $criteriaModifers->setMultiOptions(array('0' => _('Select modifier')));
             }
             $this->addElement($criteriaModifers);
             /****************** VALUE ***********/
             $criteriaValue = new Zend_Form_Element_Text("sp_criteria_value_" . $i . "_" . $j);
             $criteriaValue->setAttrib('class', 'input_text sp_input_text')->setDecorators(array('viewHelper'));
             if ($i != 0 && !isset($criteriaKeys[$i])) {
                 $criteriaValue->setAttrib('disabled', 'disabled');
             }
             if (isset($criteriaKeys[$i])) {
                 $criteriaValue->setValue($storedCrit["crit"][$criteriaKeys[$i]][$j]["value"]);
             }
             $this->addElement($criteriaValue);
             /****************** EXTRA ***********/
             $criteriaExtra = new Zend_Form_Element_Text("sp_criteria_extra_" . $i . "_" . $j);
             $criteriaExtra->setAttrib('class', 'input_text sp_extra_input_text')->setDecorators(array('viewHelper'));
             if (isset($criteriaKeys[$i]) && isset($storedCrit["crit"][$criteriaKeys[$i]][$j]["extra"])) {
                 $criteriaExtra->setValue($storedCrit["crit"][$criteriaKeys[$i]][$j]["extra"]);
                 $criteriaValue->setAttrib('class', 'input_text sp_extra_input_text');
             } else {
                 $criteriaExtra->setAttrib('disabled', 'disabled');
             }
             $this->addElement($criteriaExtra);
         }
         //for
     }
     //for
     $repeatTracks = new Zend_Form_Element_Checkbox('sp_repeat_tracks');
     $repeatTracks->setDecorators(array('viewHelper'))->setLabel(_('Allow Repeat Tracks:'));
     if (isset($storedCrit["repeat_tracks"])) {
         $repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1 ? true : false);
     }
     $this->addElement($repeatTracks);
     $limit = new Zend_Form_Element_Select('sp_limit_options');
     $limit->setAttrib('class', 'sp_input_select')->setDecorators(array('viewHelper'))->setMultiOptions($this->getLimitOptions());
     if (isset($storedCrit["limit"])) {
         $limit->setValue($storedCrit["limit"]["modifier"]);
     }
     $this->addElement($limit);
     $limitValue = new Zend_Form_Element_Text('sp_limit_value');
     $limitValue->setAttrib('class', 'sp_input_text_limit')->setLabel(_('Limit to'))->setDecorators(array('viewHelper'));
     $this->addElement($limitValue);
     if (isset($storedCrit["limit"])) {
         $limitValue->setValue($storedCrit["limit"]["value"]);
     } else {
         // setting default to 1 hour
         $limitValue->setValue(1);
     }
     //getting block content candidate count that meets criteria
     $bl = new Application_Model_Block($p_blockId);
     if ($p_isValid) {
         $files = $bl->getListofFilesMeetCriteria();
         $showPoolCount = true;
     } else {
         $files = null;
         $showPoolCount = false;
     }
     $generate = new Zend_Form_Element_Button('generate_button');
     $generate->setAttrib('class', 'btn btn-small');
     $generate->setAttrib('title', _('Generate playlist content and save criteria'));
     $generate->setIgnore(true);
     $generate->setLabel(_('Generate'));
     $generate->setDecorators(array('viewHelper'));
     $this->addElement($generate);
     $shuffle = new Zend_Form_Element_Button('shuffle_button');
     $shuffle->setAttrib('class', 'btn btn-small');
     $shuffle->setAttrib('title', _('Shuffle playlist content'));
     $shuffle->setIgnore(true);
     $shuffle->setLabel(_('Shuffle'));
     $shuffle->setDecorators(array('viewHelper'));
     $this->addElement($shuffle);
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/smart-block-criteria.phtml', "openOption" => $openSmartBlockOption, 'criteriasLength' => count($this->getCriteriaOptions()), 'poolCount' => $files['count'], 'modRowMap' => $modRowMap, 'showPoolCount' => $showPoolCount))));
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:101,代码来源:SmartBlockCriteria.php

示例5: init

 public function init()
 {
     /*
             $this->addElementPrefixPath('Application_Validate',
                                         '../application/validate',
                                         'validate');
                                         * */
     $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
     $emailValidator = Application_Form_Helper_ValidationTypes::overrideEmailAddressValidator();
     $notDemoValidator = new Application_Validate_NotDemoValidate();
     $this->setAttrib('id', 'user_form');
     $hidden = new Zend_Form_Element_Hidden('user_id');
     $hidden->setDecorators(array('ViewHelper'));
     $this->addElement($hidden);
     $login = new Zend_Form_Element_Text('login');
     $login->setLabel(_('Username:'));
     $login->setAttrib('class', 'input_text');
     $login->setRequired(true);
     $login->addValidator($notEmptyValidator);
     $login->addFilter('StringTrim');
     //$login->addValidator('UserNameValidate');
     $this->addElement($login);
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel(_('Password:'));
     $password->setAttrib('class', 'input_text');
     $password->setRequired(true);
     $password->addFilter('StringTrim');
     $password->addValidator($notEmptyValidator);
     $this->addElement($password);
     $passwordVerify = new Zend_Form_Element_Password('passwordVerify');
     $passwordVerify->setLabel(_('Verify Password:'));
     $passwordVerify->setAttrib('class', 'input_text');
     $passwordVerify->setRequired(true);
     $passwordVerify->addFilter('StringTrim');
     $passwordVerify->addValidator($notEmptyValidator);
     $passwordVerify->addValidator($notDemoValidator);
     $this->addElement($passwordVerify);
     $firstName = new Zend_Form_Element_Text('first_name');
     $firstName->setLabel(_('Firstname:'));
     $firstName->setAttrib('class', 'input_text');
     $firstName->addFilter('StringTrim');
     $this->addElement($firstName);
     $lastName = new Zend_Form_Element_Text('last_name');
     $lastName->setLabel(_('Lastname:'));
     $lastName->setAttrib('class', 'input_text');
     $lastName->addFilter('StringTrim');
     $this->addElement($lastName);
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel(_('Email:'));
     $email->setAttrib('class', 'input_text');
     $email->addFilter('StringTrim');
     $email->setRequired(true);
     $email->addValidator($notEmptyValidator);
     $email->addValidator($emailValidator);
     $this->addElement($email);
     $cellPhone = new Zend_Form_Element_Text('cell_phone');
     $cellPhone->setLabel(_('Mobile Phone:'));
     $cellPhone->setAttrib('class', 'input_text');
     $cellPhone->addFilter('StringTrim');
     $this->addElement($cellPhone);
     $skype = new Zend_Form_Element_Text('skype');
     $skype->setLabel(_('Skype:'));
     $skype->setAttrib('class', 'input_text');
     $skype->addFilter('StringTrim');
     $this->addElement($skype);
     $jabber = new Zend_Form_Element_Text('jabber');
     $jabber->setLabel(_('Jabber:'));
     $jabber->setAttrib('class', 'input_text');
     $jabber->addFilter('StringTrim');
     $jabber->addValidator($emailValidator);
     $this->addElement($jabber);
     $select = new Zend_Form_Element_Select('type');
     $select->setLabel(_('User Type:'));
     $select->setAttrib('class', 'input_select');
     $select->setAttrib('style', 'width: 40%');
     $select->setMultiOptions(array("G" => _("Guest"), "H" => _("DJ"), "P" => _("Program Manager"), "A" => _("Admin")));
     $select->setRequired(true);
     $this->addElement($select);
     $saveBtn = new Zend_Form_Element_Button('save_user');
     $saveBtn->setAttrib('class', 'btn btn-small right-floated');
     $saveBtn->setIgnore(true);
     $saveBtn->setLabel(_('Save'));
     $this->addElement($saveBtn);
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:84,代码来源:AddUser.php


注:本文中的Zend_Form_Element_Button::setIgnore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。