本文整理匯總了PHP中FormHelper::getAction方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormHelper::getAction方法的具體用法?PHP FormHelper::getAction怎麽用?PHP FormHelper::getAction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FormHelper
的用法示例。
在下文中一共展示了FormHelper::getAction方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: open
public function open(array $options = [])
{
$attributes['action'] = $this->helper->getAction($options);
$attributes['method'] = $this->helper->getMethod($options);
$attributes['accept-charset'] = 'UTF-8';
if (isset($options['files']) && $options['files']) {
$options['enctype'] = 'multipart/form-data';
}
$attributes = array_merge($attributes, $this->helper->array_except($options, $this->reserved));
list($message, $attributes) = $this->helper->generateAttributes($attributes);
return "<form {$attributes}>";
}
示例2: open
public function open($legend, array $options = [])
{
$attributes['action'] = $this->helper->getAction($options);
$attributes['method'] = $this->helper->getMethod($options);
$attributes['accept-charset'] = 'UTF-8';
$this->class = $options['class'];
$this->jsValidateFunction = $options['jsValidateFunction'];
if (isset($options['files']) && $options['files']) {
$options['enctype'] = 'multipart/form-data';
}
if (isset($options['validateElements']) && $options['validateElements']) {
$this->validateElements = implode(',', $options['validateElements']);
unset($options['validateElements']);
}
$attributes = array_merge($attributes, $this->helper->array_except($options, $this->reserved));
list($message, $attributes) = $this->helper->generateAttributes($attributes);
if ($legend) {
$legend = '<legend>' . $legend . '</legend>';
}
$this->setString($legend . "\n\n" . "<form {$attributes}>");
}