Admin Page Framework Documentation
  • Package
  • Class
  • Tree

Packages

  • AdminPageFramework
    • AdminPage
    • Factory
    • FieldType
    • MetaBox
    • NetworkAdmin
    • PageMetaBox
    • PostType
    • TaxonomyField
    • Widget

Classes

  • AdminPageFramework_Widget
  • AdminPageFramework_Widget_Controller
  • AdminPageFramework_Widget_Model
  • AdminPageFramework_Widget_View

Class AdminPageFramework_Widget_Controller

Provides methods of views for the widget factory class.

Those methods are public and provides means for users to set property values.

AdminPageFramework_Factory_Router
Extended by AdminPageFramework_Factory_Model
Extended by AdminPageFramework_Factory_View
Extended by AdminPageFramework_Factory_Controller
Extended by AdminPageFramework_Factory
Extended by AdminPageFramework_Widget_Router
Extended by AdminPageFramework_Widget_Model
Extended by AdminPageFramework_Widget_View
Extended by AdminPageFramework_Widget_Controller

Direct known subclasses

AdminPageFramework_Widget

Abstract
Package: AdminPageFramework\Widget
Since: 3.2.0
Located at factory/AdminPageFramework_Widget/AdminPageFramework_Widget_Controller.php

Methods summary

public
# setUp( )

The method for all necessary set-ups.

Example

public function setUp() {
    $this->setArguments(
        array(
            'description'   =>  __( 'This is a sample widget with built-in field types created by Admin Page Framework.', 'admin-page-framework-demo' ),
        )
    );
}

Since

3.2.0

Overrides

AdminPageFramework_Factory_Controller::setUp
public
# load( mixed $oAdminWidget )

The method for setting up form elements.

Since

3.2.0
public array
# enqueueStyles( array $aSRCs, array $aCustomArgs = array() )

Enqueues styles of the given sources.

Parameters

$aSRCs
array
The sources of the stylesheet to enqueue: the url, the absolute file path, or the relative path to the root directory of WordPress. Example: array( '/css/mystyle.css', '/css/mystyle2.css' )
$aCustomArgs
array
(optional) The another source argument array.

Returns

array
The array holing the queued items.

Since

3.2.0
public string
# enqueueStyle( string $sSRC, array $aCustomArgs = array() )

Enqueues a style of the given source.

Parameters

$sSRC
string
The source of the stylesheet to enqueue: the url, the absolute file path, or the relative path to the root directory of WordPress. Example: '/css/mystyle.css'.
$aCustomArgs
array
(optional) The argument array for more advanced parameters.

Argument Array

  • handle_id - (optional, string) The handle ID of the stylesheet.
  • dependencies - (optional, array) The dependency array. For more information, see codex.
  • version - (optional, string) The stylesheet version number.
  • media - (optional, string) the description of the field which is inserted into the after the input field tag.
  • attributes - (optional, array) [3.3.0+] attributes array. array( 'data-id' => '...' )

Returns

string
The style handle ID. If the passed url is not a valid url string, an empty string will be returned.

Since

3.2.0
public array
# enqueueScripts( array $aSRCs, array $aCustomArgs = array() )

Enqueues scripts by the given sources.

Example

$this->enqueueScripts(
    array(
         plugins_url( 'asset/js/test.js' , __FILE__ ), // source url or path
         plugins_url( 'asset/js/test2.js' , __FILE__ ),
    )
);

Parameters

$aSRCs
array
The sources of the stylesheets to enqueue: the URL, the absolute file path, or the relative path to the root directory of WordPress. Example: '/js/myscript.js'.
$aCustomArgs
array
(optional) Ad additional source list array.

Returns

array
The array holding the queued items.

Since

3.2.0
public string
# enqueueScript( string $sSRC, array $aCustomArgs = array() )

Enqueues a script by the given source.

Example

$this->enqueueScript(
     plugins_url( 'asset/js/test.js' , __FILE__ ), // source url or path
     array(
         'handle_id'     => 'my_script', // this handle ID also is used as the object name for the translation array below.
         'translation'   => array(
             'a'                 => 'hello world!',
             'style_handle_id'   => $sStyleHandle, // check the enqueued style handle ID here.
         ),
     )
);

Parameters

$sSRC
string
The URL of the stylesheet to enqueue, the absolute file path, or the relative path to the root directory of WordPress. Example: '/js/myscript.js'.
$aCustomArgs
array
(optional) The argument array for more advanced parameters.

Argument Array

  • handle_id - (optional, string) The handle ID of the script.
  • dependencies - (optional, array) The dependency array. For more information, see codex.
  • version - (optional, string) The stylesheet version number.
  • translation - (optional, array) The translation array. The handle ID will be used for the object name.
  • in_footer - (optional, boolean) Whether to enqueue the script before </head> or before</body> Default: false.
  • attributes - (optional, array) [3.3.0+] attributes array. array( 'data-id' => '...' )

Returns

string
The script handle ID. If the passed url is not a valid url string, an empty string will be returned.

Since

3.2.0
protected
# setArguments( array $aArguments = array() )

Sets the widget arguments.

This is only necessary if it is not set in the constructor.

Since

3.2.0

Methods inherited from AdminPageFramework_Widget_View

content()

Methods inherited from AdminPageFramework_Widget_Model

validate()

Methods inherited from AdminPageFramework_Widget_Router

__call()

Methods inherited from AdminPageFramework_Factory_Controller

addHelpText(), addSettingField(), addSettingFields(), addSettingSection(), addSettingSections(), hasFieldError(), hasSettingNotice(), setFieldErrors(), setSettingNotice()

Methods inherited from AdminPageFramework_Factory_View

__construct(), _replyToGetFieldOutput(), _replyToPrintSettingNotice()

Methods inherited from AdminPageFramework_Factory_Model

_getFieldErrors(), _isValidationErrors(), _loadDefaultFieldTypeDefinitions(), _registerFields(), _replyToDeleteFieldErrors(), _replyToSaveFieldErrors(), _replyToSaveNotices(), _setLastInput(), _setUp(), getFieldErrors(), getSavedOptions()

Methods inherited from AdminPageFramework_Factory_Router

__get(), __toString(), _getFormInstance(), _getHelpPaneInstance(), _getLinkInstancce(), _getPageLoadInfoInstance(), _getResourceInstance(), _isInThePage(), _isInstantiatable(), _replyToLoadComponents()

Magic methods summary

Properties summary

Properties inherited from AdminPageFramework_Factory_Router

$oProp

Admin Page Framework Documentation generated by ApiGen 2.8.0