PHP 클래스 WPDKUIControl

[control label][control input][extra] In detail a WPDK ui control has the follow structure: [before] [before_label] [label control] [after_label] [prepend] [main control][extra] [append] [after] However every control class has its drawing method to manage different output. ## Overview This class allow to make simple display button and common UI.
저자: =undo= ([email protected])
파일 보기 프로젝트 열기: wpxtreme/wpdk 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$attrs array | string A string with list of attributes
$class string | array A string or an array with CSS classes
$data string | array A string or an array with list of data attributes
$id string A sanitize attribute id
$item array A key value pairs array with the WPDK ui control description
$name string The name attribute
$style string A string with inlibe CSS styles

공개 메소드들

메소드 설명
__construct ( array $item_control ) Create an instance of WPDKUIControl class
display ( ) Display the control
draw ( ) Drawing
html ( ) : string Return the HTML markup for control

보호된 메소드들

메소드 설명
attrs ( ) : string Return a string with complete list of generic attributes as title, id, etc.
classes ( ) : string Return a string with complete list of CSS class
contentWithKey ( string $key ) : string Return the content by specific key. If the content is an instance of class WPDKUIControl then get the HTML.
data ( ) : string Return a string with complete list of data attributes as data-name = "value". For example:
guide ( ) : string Return the HTML markup for the guide engine
inputType ( string | WPDKHTMLTagInputType $type = WPDKHTMLTagInputType::TEXT, string $class = '' ) This is a utility method to display a common input type
label ( ) : null | WPDKHTMLTagLabel Return an instance of WPDKHTMLTagLabel class or null if no label provided.

비공개 메소드들

메소드 설명
sizeForType ( string $type ) : integer Return the specific attribute size for control type

메소드 상세

__construct() 공개 메소드

Create an instance of WPDKUIControl class
public __construct ( array $item_control )
$item_control array Control array

attrs() 보호된 메소드

..
protected attrs ( ) : string
리턴 string

classes() 보호된 메소드

Return a string with complete list of CSS class
protected classes ( ) : string
리턴 string

contentWithKey() 보호된 메소드

If the content is an array (Controls Layout array) porcess it as sub-control.
protected contentWithKey ( string $key ) : string
$key string String key in array
리턴 string

data() 보호된 메소드

The data asttributes are readable and writeable from jQuery with: $( 'div' ).data( 'my_attribute' );
protected data ( ) : string
리턴 string

display() 공개 메소드

Display the control
public display ( )

draw() 공개 메소드

Drawing
public draw ( )

guide() 보호된 메소드

Return the HTML markup for the guide engine
부터: 1.0.0.b4
protected guide ( ) : string
리턴 string

html() 공개 메소드

Return the HTML markup for control
public html ( ) : string
리턴 string

inputType() 보호된 메소드

This is a utility method to display a common input type
protected inputType ( string | WPDKHTMLTagInputType $type = WPDKHTMLTagInputType::TEXT, string $class = '' )
$type string | WPDKHTMLTagInputType Optional. Type of input
$class string Optional. CSS additional class

label() 보호된 메소드

Return an instance of WPDKHTMLTagLabel class or null if no label provided.
protected label ( ) : null | WPDKHTMLTagLabel
리턴 null | WPDKHTMLTagLabel

프로퍼티 상세

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

A string with list of attributes
protected array|string $attrs
리턴 array | string

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

A string or an array with CSS classes
protected string|array $class
리턴 string | array

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

A string or an array with list of data attributes
protected string|array $data
리턴 string | array

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

A sanitize attribute id
protected string $id
리턴 string

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

A key value pairs array with the WPDK ui control description
protected array $item
리턴 array

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

The name attribute
protected string $name
리턴 string

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

A string with inlibe CSS styles
protected string $style
리턴 string