Make iForm static, as it is used as such in other places

This commit is contained in:
yysa 2014-11-10 21:03:55 +01:00
parent 4edd18227d
commit 02caa4eb24
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class HtmlFormHelper extends Helper {
if (!isset($this->obj)) { if (!isset($this->obj)) {
throw AppException('Can not generate form : no object given in Helper'); throw AppException('Can not generate form : no object given in Helper');
} }
$str = $this->iForm($name, $method, $action); $str = self::iForm($name, $method, $action);
$str .= $this->obj->iFields($class); $str .= $this->obj->iFields($class);
$str .= '</form>'; $str .= '</form>';
return $str; return $str;
@ -42,7 +42,7 @@ class HtmlFormHelper extends Helper {
* @param string $method post, get, or file (post by default) * @param string $method post, get, or file (post by default)
* @param string $action URL to which form is sent (current page by default) * @param string $action URL to which form is sent (current page by default)
*/ */
public function iForm($name, $method='post', $action='', $class='') { public static function iForm($name, $method='post', $action='', $class='') {
$fc = FrontController::getInstance(); $fc = FrontController::getInstance();
if (!$action) { if (!$action) {
$action = $fc->thisUrl(); $action = $fc->thisUrl();