PHP Class PodsField_File, pods

Inheritance: extends PodsField
Afficher le fichier Open project: pods-framework/pods Class Usage Examples

Méthodes publiques

Свойство Type Description
$group string Field Type Group
$label string Field Type Label
$type string Field Type Identifier

Protected Properties

Свойство Type Description
$api PodsAPI API caching for fields that need it during validate/save

Méthodes publiques

Méthode Description
__construct ( ) Do things like register/enqueue scripts and stylesheets
admin_ajax_upload ( ) Handle plupload AJAX
admin_init ( ) Add admin_init actions
display ( mixed $value = null, string $name = null, array $options = null, array $pod = null, integer $id = null ) : mixed | null Change the way the value of the field is displayed with Pods::get
images ( integer $id, mixed $value, string $name = null, array $options = null, array $pod = null, string $image_size = null ) : string Return image(s) markup
input ( string $name, mixed $value = null, array $options = null, array $pod = null, integer $id = null ) Customize output of the form field
markup ( array $attributes, integer $limit = 1, boolean $editable = true, integer $id = null, string $icon = null, string $name = null, $linked = false, $link = null ) : string Handle file row output for uploaders
options ( ) Add options and set defaults to
pre_save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null ) : mixed Change the value or perform actions after validation but before saving to the DB
regex ( mixed $value = null, string $name = null, array $options = null, string $pod = null, integer $id = null ) : boolean Build regex necessary for JS validation
save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null ) Save the value to the DB
schema ( array $options = null ) : array Define the current field's schema for DB table storage
ui ( integer $id, mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null ) : mixed | void Customize the Pods UI manage table column output
validate ( mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null, integer $id = null, null $params = null ) : boolean Validate a value before it's saved

Method Details

__construct() public méthode

Do things like register/enqueue scripts and stylesheets
Since: 2.0
public __construct ( )

admin_ajax_upload() public méthode

Handle plupload AJAX
Since: 2.3
public admin_ajax_upload ( )

admin_init() public méthode

Add admin_init actions
Since: 2.3
public admin_init ( )

display() public méthode

Change the way the value of the field is displayed with Pods::get
Since: 2.0
public display ( mixed $value = null, string $name = null, array $options = null, array $pod = null, integer $id = null ) : mixed | null
$value mixed
$name string
$options array
$pod array
$id integer
Résultat mixed | null

images() public méthode

Return image(s) markup
Since: 2.3
public images ( integer $id, mixed $value, string $name = null, array $options = null, array $pod = null, string $image_size = null ) : string
$id integer
$value mixed
$name string
$options array
$pod array
$image_size string
Résultat string

input() public méthode

Customize output of the form field
Since: 2.0
public input ( string $name, mixed $value = null, array $options = null, array $pod = null, integer $id = null )
$name string
$value mixed
$options array
$pod array
$id integer

markup() public méthode

Handle file row output for uploaders
Since: 2.0
public markup ( array $attributes, integer $limit = 1, boolean $editable = true, integer $id = null, string $icon = null, string $name = null, $linked = false, $link = null ) : string
$attributes array
$limit integer
$editable boolean
$id integer
$icon string
$name string
Résultat string

options() public méthode

Add options and set defaults to
Since: 2.0
public options ( )

pre_save() public méthode

Change the value or perform actions after validation but before saving to the DB
Since: 2.0
public pre_save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null ) : mixed
$value mixed
$id integer
$name string
$options array
$fields array
$pod array
$params object
Résultat mixed

regex() public méthode

Build regex necessary for JS validation
Since: 2.0
public regex ( mixed $value = null, string $name = null, array $options = null, string $pod = null, integer $id = null ) : boolean
$value mixed
$name string
$options array
$pod string
$id integer
Résultat boolean

save() public méthode

Save the value to the DB
Since: 2.3
public save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null )
$value mixed
$id integer
$name string
$options array
$fields array
$pod array
$params object

schema() public méthode

Define the current field's schema for DB table storage
Since: 2.0
public schema ( array $options = null ) : array
$options array
Résultat array

ui() public méthode

Customize the Pods UI manage table column output
Since: 2.0
public ui ( integer $id, mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null ) : mixed | void
$id integer
$value mixed
$name string
$options array
$fields array
$pod array
Résultat mixed | void

validate() public méthode

Validate a value before it's saved
Since: 2.0
public validate ( mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null, integer $id = null, null $params = null ) : boolean
$value mixed
$name string
$options array
$fields array
$pod array
$id integer
$params null
Résultat boolean

Property Details

$api protected_oe static_oe property

API caching for fields that need it during validate/save
Since: 2.3
protected static PodsAPI $api
Résultat PodsAPI

$group public_oe static_oe property

Field Type Group
Since: 2.0
public static string $group
Résultat string

$label public_oe static_oe property

Field Type Label
Since: 2.0
public static string $label
Résultat string

$type public_oe static_oe property

Field Type Identifier
Since: 2.0
public static string $type
Résultat string