PHP Class WPDKPreferencesView

Author: =undo= ([email protected])
Inheritance: extends WPDKView
Datei anzeigen Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$branch WPDKPreferencesBranch An instance of WPDKPreferencesBranch class
$preferences WPDKPreferences An instance of WPDKPreferences class

Public Methods

Method Description
__construct ( WPDKPreferences $preferences, string $property ) : WPDKPreferencesView Create an instance of WPDKPreferencesView class
buttonPage ( string $slug, string $referrer = '', string $post_type = 'page', string $combo_select = '' ) : string Return the HTML markup for a button Create/Edit for a post of type page.
buttonsUpdateReset ( ) : string Return the HTML markup for standard [Reset to default] and [Update] buttons. You can override this method to hide or change the default buttons on bottom form.
draw ( ) Display
fields ( WPDKPreferencesBranch $branch ) : array Override to return the array fields

Method Details

__construct() public method

Create an instance of WPDKPreferencesView class
public __construct ( WPDKPreferences $preferences, string $property ) : WPDKPreferencesView
$preferences WPDKPreferences An instance of WPDKPreferences clas
$property string Preferences branch property name
return WPDKPreferencesView

buttonPage() public method

Return the HTML markup for a button Create/Edit for a post of type page.
public buttonPage ( string $slug, string $referrer = '', string $post_type = 'page', string $combo_select = '' ) : string
$slug string The page slug from preference. May be empty.
$referrer string Optional. A string used as get params whe edit post in order to display a button "Back to...". If youo set this params you have to manage the relative hook in edit post.
$post_type string Optional. Post type. Default 'page'.
$combo_select string Optional. ID of select combo from which get the selected post type. Default empty.
return string

buttonsUpdateReset() public method

Return the HTML markup for standard [Reset to default] and [Update] buttons. You can override this method to hide or change the default buttons on bottom form.
public buttonsUpdateReset ( ) : string
return string

draw() public method

Display
public draw ( )

fields() public method

Override to return the array fields
public fields ( WPDKPreferencesBranch $branch ) : array
$branch WPDKPreferencesBranch An instance of preferences branch
return array

Property Details

$branch public_oe property

An instance of WPDKPreferencesBranch class
public WPDKPreferencesBranch $branch
return WPDKPreferencesBranch

$preferences public_oe property

An instance of WPDKPreferences class
public WPDKPreferences $preferences
return WPDKPreferences