當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Am_Form_Setup::addFieldsPrefix方法代碼示例

本文整理匯總了PHP中Am_Form_Setup::addFieldsPrefix方法的典型用法代碼示例。如果您正苦於以下問題:PHP Am_Form_Setup::addFieldsPrefix方法的具體用法?PHP Am_Form_Setup::addFieldsPrefix怎麽用?PHP Am_Form_Setup::addFieldsPrefix使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Am_Form_Setup的用法示例。


在下文中一共展示了Am_Form_Setup::addFieldsPrefix方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onSetupForms

 function onSetupForms(Am_Event_SetupForms $event)
 {
     $form = new Am_Form_Setup('facebook');
     $form->setTitle('Facebook');
     $fs = $form->addFieldset()->setLabel(___('FaceBook Application'));
     $fs->addText('app_id')->setLabel(___('FaceBook App ID'));
     $fs->addText('app_secret', array('size' => 40))->setLabel(___('Facebook App Secret'));
     $fs = $form->addFieldset()->setLabel(___('Features'));
     $gr = $fs->addCheckboxedGroup('like')->setLabel(___('Add "Like" button'));
     $gr->addStatic()->setContent(___('Like Url'));
     $gr->addText('likeurl', array('size' => 40));
     $form->setDefault('likeurl', ROOT_URL);
     $fs->addAdvCheckbox('no_signup')->setLabel(___('Do not add to Signup Form'));
     $fs->addAdvCheckbox('no_login')->setLabel(___('Do not add to Login Form'));
     $form->addFieldsPrefix('misc.facebook.');
     $event->addForm($form);
 }
開發者ID:subashemphasize,項目名稱:test_site,代碼行數:17,代碼來源:facebook.php

示例2: onSetupForms

 function onSetupForms(Am_Event_SetupForms $event)
 {
     $form = new Am_Form_Setup('facebook');
     $form->setTitle('Facebook');
     $fs = $form->addFieldset()->setLabel(___('FaceBook Application'));
     $fs->addText(self::FB_APP_ID)->setLabel(___('FaceBook App ID'));
     $fs->addText(self::FB_APP_SECRET, array('size' => 40))->setLabel(___('Facebook App Secret'));
     $fs = $form->addFieldset()->setLabel(___('Features'));
     $gr = $fs->addCheckboxedGroup('like')->setLabel(___('Add "Like" button'));
     $gr->addStatic()->setContent(___('Like Url'));
     $gr->addText('likeurl', array('size' => 40));
     $form->setDefault('likeurl', ROOT_URL);
     $fs->addAdvCheckbox('no_signup')->setLabel(___('Do not add to Signup Form'));
     $fs->addAdvCheckbox('no_login')->setLabel(___('Do not add to Login Form'));
     $fs->addSelect('add_access', null, array('options' => array('' => '-- Do not add access --') + Am_Di::getInstance()->productTable->getOptions()))->setLabel(___('Add free access to a product if user signup from Facebook'));
     $form->addFieldsPrefix('misc.facebook.');
     $this->_afterInitSetupForm($form);
     $event->addForm($form);
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:19,代碼來源:facebook.php

示例3: _afterInitSetupForm

 protected function _afterInitSetupForm(Am_Form_Setup $form)
 {
     if ($this->_configPrefix) {
         $form->addFieldsPrefix($this->_configPrefix . $this->getId() . '.');
     }
     if ($plugin_readme = $this->getReadme()) {
         $plugin_readme = str_replace(array('%root_url%', '%root_surl%', '%root_dir%'), array(ROOT_URL, ROOT_SURL, ROOT_DIR), $plugin_readme);
         $form->addEpilog('<div class="info"><pre>' . $plugin_readme . '</pre></div>');
     }
     if (defined($const = get_class($this) . "::PLUGIN_STATUS") && (constant($const) == self::STATUS_BETA || constant($const) == self::STATUS_DEV)) {
         $beta = constant($const) == self::STATUS_DEV ? 'ALPHA' : 'BETA';
         $form->addProlog("<div class='warning_box'>This plugin is currently in {$beta} testing stage, some features may be unstable. " . "Please test it carefully before use.</div>");
     }
 }
開發者ID:alexanderTsig,項目名稱:arabic,代碼行數:14,代碼來源:App.php


注:本文中的Am_Form_Setup::addFieldsPrefix方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。