本文整理汇总了PHP中sfForm::renderFormTag方法的典型用法代码示例。如果您正苦于以下问题:PHP sfForm::renderFormTag方法的具体用法?PHP sfForm::renderFormTag怎么用?PHP sfForm::renderFormTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfForm
的用法示例。
在下文中一共展示了sfForm::renderFormTag方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderFormTag
public function renderFormTag($url, array $attributes = array())
{
$result = parent::renderFormTag($url, $attributes);
if (sfConfig::get('app_is_mobile') && opConfig::get('retrieve_uid')) {
$pos = strpos($result, '>');
$head = substr($result, 0, $pos);
$foot = substr($result, $pos);
$result = $head . ' utn' . $foot;
}
return $result;
}
示例2: get_sympal_slot_form_tag
/**
* Returns the form tag for the form that saves a content slot
*
* @param sfForm $form The form object for this slot
* @param sfSympalContentSlot $contentSlot The content slot that is being modified
*/
function get_sympal_slot_form_tag(sfForm $form, sfSympalContentSlot $contentSlot)
{
$url = url_for('sympal_save_content_slot', array('id' => $contentSlot->id, 'content_id' => $contentSlot->getContentRenderedFor()->id));
$options = array('method' => 'post', 'id' => 'sympal_slot_form_' . $contentSlot->id, 'class' => 'sympal_slot_form');
return $form->renderFormTag($url, $options);
}
示例3: form_tag_for
function form_tag_for(sfForm $form, $routePrefix, $attributes = array())
{
return $form->renderFormTag(url_for_form($form, $routePrefix), $attributes);
}
示例4: renderFormTag
/**
* Renders a form tag suitable for the related Propel object.
*
* The method is automatically guessed based on the Propel object:
*
* * if the object is new, the method is POST
* * if the object already exists, the method is PUT
*
* @param string $url The URL for the action
* @param array $attributes An array of HTML attributes
*
* @return string An HTML representation of the opening form tag
*
* @see sfForm
*/
public function renderFormTag($url, array $attributes = array())
{
$attributes['method'] = $this->getObject()->isNew() ? 'post' : 'put';
return parent::renderFormTag($url, $attributes);
}
示例5: renderFormTag
/**
* Renders a form tag suitable for the related Doctrine object.
*
* The method is automatically guessed based on the Doctrine object:
*
* * if the object is new, the method is POST
* * if the object already exists, the method is PUT
*
* @param string $url The URL for the action
* @param array $attributes An array of HTML attributes
*
* @return string An HTML representation of the opening form tag
*
* @see sfForm
*/
public function renderFormTag($url, array $attributes = array())
{
if (!isset($attributes['method'])) {
$attributes['method'] = $this->isNew() ? 'post' : 'put';
}
return parent::renderFormTag($url, $attributes);
}
示例6: button_to
echo button_to(__('Delete consumer secret'), '@op_opensocial_delete_consumer_secret?id=' . $application->getId());
} else {
echo button_to(__('Generate consumer secret'), '@op_opensocial_update_consumer_secret?id=' . $application->getId());
}
?>
</td></tr>
<tr><th>Signature method</th><td>HMAC-SHA1</td></tr>
<tr><td colspan="2">
<?php
echo button_to(__('Delete'), '@op_opensocial_delete?id=' . $sf_request->getParameter('id'), array('style' => 'float:left'));
?>
<?php
$form = new sfForm();
echo $form->renderFormTag(url_for('@op_opensocial_update?id=' . $sf_request->getParameter('id')), array('style' => 'float:left'));
echo $form->renderHiddenFields();
?>
<input type="submit" value="<?php
echo __('Update');
?>
" />
</form>
<?php
if ($application->isActive()) {
echo $form->renderFormTag(url_for('@op_opensocial_inactivate?id=' . $sf_request->getParameter('id')));
echo $form->renderHiddenFields();
?>
<input type="submit" value="<?php
echo __('Inactivate');
?>
示例7: renderFormTag
/**
* Renders a form tag suitable for the related Doctrine object.
*
* The method is automatically guessed based on the Doctrine object:
*
* * if the object is new, the method is POST
* * if the object already exists, the method is PUT
*
* @param string $url The URL for the action
* @param array $attributes An array of HTML attributes
*
* @return string An HTML representation of the opening form tag
*
* @see sfForm
*/
public function renderFormTag($url, array $attributes = array())
{
$attributes['method'] = $this->isNew() ? 'POST' : 'PUT';
return parent::renderFormTag($url, $attributes);
}
示例8: __
?>
<?php
slot('title');
echo __('Delete App');
end_slot();
?>
<?php
use_helper('Javascript');
?>
<p><?php
echo __('Do you delete this app?');
?>
</p>
<p><?php
echo $application->getTitle();
?>
</p>
<?php
$form = new sfForm();
echo $form->renderFormTag(url_for('@op_opensocial_delete?id=' . $sf_request->getParameter('id')));
echo $form->renderHiddenFields();
?>
<input type="submit" value="<?php
echo __('Delete');
?>
">
</form>
<?php
echo link_to_function(__('Back to previous page'), 'history.back()');
示例9: jq_link_to_remote
<div id="sf_admin_actions_menu">
<ul>
<li id="indicator" style="display: none"></li>
<?php
if_javascript();
?>
<li>
<?php
echo jq_link_to_remote('Show/hide filters', array('update' => 'filters', 'url' => '@chart_toggle_filters_visibility', 'method' => 'post', 'loading' => "\$('#indicator').toggle()", 'complete' => "\$('#indicator').toggle()"));
?>
</li>
<?php
end_if_javascript();
?>
<noscript>
<li>
<?php
$f = new sfForm();
echo $f->renderFormTag(url_for('@chart_toggle_filters_visibility'));
?>
<input type="submit" value="Show/hide filters" class="noscript"/></form>
</li>
</noscript>
</li>
</ul>
</div>
示例10: form_tag_for_confirm
function form_tag_for_confirm(sfForm $form, $routePrefix, $attributes = array())
{
return $form->renderFormTag(url_for_form_confirm($form, $routePrefix), array_merge(array('method' => 'post'), $attributes));
}