PHP 클래스 Grunion_Contact_Form_Field, jetpack

Parses shortcode to output the contact form field as HTML. Validates input.
상속: extends Crunion_Contact_Form_Shortcode
파일 보기 프로젝트 열기: automattic/jetpack 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$error Is the input invalid?
$form parent form
$shortcode_name
$value default or POSTed value

공개 메소드들

메소드 설명
__construct ( array $attributes, null | string $content = null, Grunion_Contact_Form $form = null )
add_error ( string $message ) This field's input is invalid. Flag as invalid and add an error to the parent form
is_error ( ) : boolean Is the field input invalid?
render ( ) : string Outputs the HTML for this form field
validate ( ) Validates the form input

메소드 상세

__construct() 공개 메소드

public __construct ( array $attributes, null | string $content = null, Grunion_Contact_Form $form = null )
$attributes array An associative array of shortcode attributes. @see shortcode_atts()
$content null | string Null for selfclosing shortcodes. The inner content otherwise.
$form Grunion_Contact_Form The parent form

add_error() 공개 메소드

This field's input is invalid. Flag as invalid and add an error to the parent form
public add_error ( string $message )
$message string The error message to display on the form.

is_error() 공개 메소드

Is the field input invalid?
public is_error ( ) : boolean
리턴 boolean

render() 공개 메소드

Outputs the HTML for this form field
public render ( ) : string
리턴 string HTML

validate() 공개 메소드

Validates the form input
public validate ( )

프로퍼티 상세

$error 공개적으로 프로퍼티

Is the input invalid?
public $error

$form 공개적으로 프로퍼티

parent form
public $form

$shortcode_name 공개적으로 프로퍼티

public $shortcode_name

$value 공개적으로 프로퍼티

default or POSTed value
public $value