本文整理汇总了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);
}
示例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);
}
示例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>");
}
}