PHP 클래스 formHelper, nodejs-autorestart

파일 보기 프로젝트 열기: shimondoodkin/nodejs-autorestart 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$checkboxes Cache containing individual radio or checkbox elements in an array
$radios Cache containing individual radio or checkbox elements in an array

보호된 프로퍼티들

프로퍼티 타입 설명
$_staticTypes array Form types that do not change value with user input

공개 메소드들

메소드 설명
getCheckboxes ( array $args ) : str Returns a set of checkbox form elements
getErrorMessageContainer ( string $id, string $errorMessage = '' ) : string Returns a standardized container to wrap an error message
getFormClose ( ) : string Closes a form if one is open
getFormOpen ( array $args = [] ) : string Begins a form Includes a safety mechanism to prevent re-opening an already-open form
getInput ( array $args ) : string Used for text, textarea, hidden, password, file, button, image and submit
getRadios ( array $args ) : str Returns a set of radio form elements
getSelect ( array $args ) : str Returns a form select element

보호된 메소드들

메소드 설명
_getLabel ( array $args, str $formElement ) : str Adds label tags to a form element
_getProperties ( array $args, array $propertyNames = [] ) : array Sets the standard properties available to all input elements in addition to user-defined properties Standard properties are: name, value, class, style, id
_indexDynamicArray ( string $name ) : string Converts dynamically-assigned array indecies to use an explicitely defined index

메소드 상세

_getLabel() 보호된 메소드

Adds label tags to a form element
protected _getLabel ( array $args, str $formElement ) : str
$args array
$formElement str
리턴 str

_getProperties() 보호된 메소드

Sets the standard properties available to all input elements in addition to user-defined properties Standard properties are: name, value, class, style, id
protected _getProperties ( array $args, array $propertyNames = [] ) : array
$args array
$propertyNames array Optional, an array of user-defined properties
리턴 array

_indexDynamicArray() 보호된 메소드

Converts dynamically-assigned array indecies to use an explicitely defined index
protected _indexDynamicArray ( string $name ) : string
$name string
리턴 string

getCheckboxes() 공개 메소드

This method essentially extends the getRadios method and uses an identical signature except that $args['value'] can also accept an array of values to be checked.
public getCheckboxes ( array $args ) : str
$args array
리턴 str

getErrorMessageContainer() 공개 메소드

Returns a standardized container to wrap an error message
public getErrorMessageContainer ( string $id, string $errorMessage = '' ) : string
$id string
$errorMessage string Optional, you may want to leave this blank and populate dynamically via JavaScript
리턴 string

getFormClose() 공개 메소드

Closes a form if one is open
public getFormClose ( ) : string
리턴 string

getFormOpen() 공개 메소드

Begins a form Includes a safety mechanism to prevent re-opening an already-open form
public getFormOpen ( array $args = [] ) : string
$args array
리턴 string

getInput() 공개 메소드

Valid args are any properties valid within an HTML input as well as label
public getInput ( array $args ) : string
$args array
리턴 string

getRadios() 공개 메소드

array( 'name' => '', 'value' => '', 'id' => '', 'legend' => '', 'options' => array('value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'), 'options' => array('text1', 'text2', 'text3'), //also acceptable (cannot do half this, half above syntax) )
public getRadios ( array $args ) : str
$args array
리턴 str

getSelect() 공개 메소드

$args = array( 'name' => '', 'multiple' => true, 'leadingOptions' => array(), 'optgroups' => array('group 1' => array('label' => 'g1o1', 'value' => 'grp 1 opt 1'), 'group 2' => array(),), 'options' => array('value1' => 'text1', 'value2' => 'text2', 'value3' => 'text3'), 'value' => array('value2', 'value3') //if (multiple==false) 'value' => (str) 'value3' );
public getSelect ( array $args ) : str
$args array
리턴 str

프로퍼티 상세

$_staticTypes 보호되어 있는 프로퍼티

Form types that do not change value with user input
protected array $_staticTypes
리턴 array

$checkboxes 공개적으로 프로퍼티

Cache containing individual radio or checkbox elements in an array
public $checkboxes

$radios 공개적으로 프로퍼티

Cache containing individual radio or checkbox elements in an array
public $radios