Admin Page Framework - Field Type Pack Documentation
  • Package
  • Class

Packages

  • AdminPageFrameworkFieldTypePack
    • CustomFieldType

Classes

  • AutoCompleteCustomFieldType
  • DateCustomFieldType
  • DateRangeCustomFieldType
  • DateTimeCustomFieldType
  • DateTimeRangeCustomFieldType
  • DialCustomFieldType
  • EDDSoftwareLicensingCustomFieldType
  • FontCustomFieldType
  • GeometryCustomFieldType
  • GridCustomFieldType
  • ImageCheckboxCustomFieldType
  • ImageRadioCustomFieldType
  • LinkCustomFieldType
  • RevealerCustomFieldType
  • TimeCustomFieldType
  • TimeRangeCustomFieldType

Class GridCustomFieldType

Defines the grid field type.

Field Type Specific Arguments

  • grid_options - (array) The settings passed to the gridster() jQuery plugin method.

Example

array(
    'field_id'          => 'grid_field',
    'type'              => 'grid',
    'description'       => __( 'Move the widgets.', 'admin-page-framework-field-type-pack' ),
    'show_title_column' => false, // this removes the title column of the field output
    'grid_options'      => array(
        'resize' => array(
            'enabled' => false,
        ),
    ),
    'default'           => array( // '[{"id":"","col":1,"row":1,"size_y":1,"size_x":1},{"id":"","col":1,"row":2,"size_y":1,"size_x":1}]',
        array(
            'col'       => 1,
            'row'       => 1,
            'size_y'    => 1,
            'size_x'    => 1,
        ),
        array(
            'col'       => 2,
            'row'       => 2,
            'size_y'    => 1,
            'size_x'    => 1,
        ),
    ),
),
array(
    'field_id'          => 'grid_field2',
    'description'       => __( 'Widgets can be expanded.', 'admin-page-framework-field-type-pack' ),
    'type'              => 'grid',
    'grid_options'      => array(
        'resize' => array(
            'enabled' =>    true,
        ),
    ),
    'show_title_column' => false,
    'default'           => array(
        array(
            'col'       => 1,
            'row'       => 1,
            'size_y'    => 2,
            'size_x'    => 1,
        ),
        array(
            'col'       => 2,
            'row'       => 1,
            'size_y'    => 1,
            'size_x'    => 2,
        ),
        array(
            'col'       => 4,
            'row'       => 1,
            'size_y'    => 1,
            'size_x'    => 2,
        ),
    ),
),
array(
    'field_id'          => 'grid_field3',
    'type'              => 'grid',
    'description'       => __( 'The base size can be different.', 'admin-page-framework-field-type-pack' ),
    'grid_options'      => array(
        'resize' => array(
            'enabled' =>    true,
        ),
        'widget_margins' => array( 10, 10 ),
        'widget_base_dimensions' => array( 100, 100 ),
    ),
    'show_title_column' => false,
    'default'           => array(
        array(
            'col' => 1,
            'row' => 1,
            'size_y' => 1,
            'size_x' => 1,
        ),
    ),
)
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
See: http://gridster.net/#documentation
Located at custom-field-types/grid-custom-field-type/GridCustomFieldType.php

Methods summary

protected
# setUp( )

Loads the field type necessary components.

protected
# getEnqueuingScripts( )

Returns an array holding the urls of enqueuing scripts.

protected
# getEnqueuingStyles( )

Returns an array holding the urls of enqueuing styles.

protected
# getScripts( )

Returns the field type specific JavaScript script.

protected
# getIEStyles( )

Returns IE specific CSS rules.

protected
# getStyles( )

Returns the field type specific CSS rules.

protected
# getField( mixed $aField )

Returns the output of the field type.

Magic methods summary

Properties summary

public array $aFieldTypeSlugs
#

Defines the field type slugs used for this field type.

protected array $aDefaultKeys
#

Defines the default key-values of this field type.

Remark

$_aDefaultKeys holds shared default key-values defined in the base class.
Admin Page Framework - Field Type Pack Documentation generated by ApiGen 2.8.0