PHP Класс PodsField_File, pods

Наследование: extends PodsField
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$group string Field Type Group
$label string Field Type Label
$type string Field Type Identifier

Защищенные свойства (Protected)

Свойство Тип Описание
$api PodsAPI API caching for fields that need it during validate/save

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

Do things like register/enqueue scripts and stylesheets
С версии: 2.0
public __construct ( )

admin_ajax_upload() публичный Метод

Handle plupload AJAX
С версии: 2.3
public admin_ajax_upload ( )

admin_init() публичный Метод

Add admin_init actions
С версии: 2.3
public admin_init ( )

display() публичный Метод

Change the way the value of the field is displayed with Pods::get
С версии: 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
Результат mixed | null

images() публичный Метод

Return image(s) markup
С версии: 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
Результат string

input() публичный Метод

Customize output of the form field
С версии: 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() публичный Метод

Handle file row output for uploaders
С версии: 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
Результат string

options() публичный Метод

Add options and set defaults to
С версии: 2.0
public options ( )

pre_save() публичный Метод

Change the value or perform actions after validation but before saving to the DB
С версии: 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
Результат mixed

regex() публичный Метод

Build regex necessary for JS validation
С версии: 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
Результат boolean

save() публичный Метод

Save the value to the DB
С версии: 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() публичный Метод

Define the current field's schema for DB table storage
С версии: 2.0
public schema ( array $options = null ) : array
$options array
Результат array

ui() публичный Метод

Customize the Pods UI manage table column output
С версии: 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
Результат mixed | void

validate() публичный Метод

Validate a value before it's saved
С версии: 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
Результат boolean

Описание свойств

$api защищенное статическое свойство

API caching for fields that need it during validate/save
С версии: 2.3
protected static PodsAPI $api
Результат PodsAPI

$group публичное статическое свойство

Field Type Group
С версии: 2.0
public static string $group
Результат string

$label публичное статическое свойство

Field Type Label
С версии: 2.0
public static string $label
Результат string

$type публичное статическое свойство

Field Type Identifier
С версии: 2.0
public static string $type
Результат string