PHP 클래스 Elgg\FormsService

Use the elgg_* versions instead.
부터: 2.3
파일 보기 프로젝트 열기: elgg/elgg

공개 메소드들

메소드 설명
__construct ( ViewsService $views, Logger $logger ) Constructor
getFooter ( ) : string | false Returns currently set footer, or false if not in the form rendering stack
render ( string $action, array $form_vars = [], array $body_vars = [] ) : string Convenience function for generating a form from a view in a standard location.
setFooter ( string $footer = '' ) : boolean Sets form footer and defers its rendering until the form view and extensions have been rendered.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( ViewsService $views, Logger $logger )
$views ViewsService Views service
$logger Logger Logger service

getFooter() 공개 메소드

Returns currently set footer, or false if not in the form rendering stack
public getFooter ( ) : string | false
리턴 string | false

render() 공개 메소드

This function assumes that the body of the form is located at "forms/$action" and sets the action by default to "action/$action". Automatically wraps the forms/$action view with a
tag and inserts the anti-csrf security tokens.
public render ( string $action, array $form_vars = [], array $body_vars = [] ) : string
$action string The name of the action. An action name does not include the leading "action/". For example, "login" is an action name.
$form_vars array $vars passed to the "input/form" view
$body_vars array $vars passed to the "forms/" view
리턴 string The complete form

setFooter() 공개 메소드

Deferring footer rendering allows plugins to extend the form view while maintaining logical DOM structure. Footer will be rendered using 'elements/forms/footer' view after form body has finished rendering
public setFooter ( string $footer = '' ) : boolean
$footer string Footer
리턴 boolean