Method |
Description |
|
__call ( $name, $args ) : mixed |
Handle methods that have been deprecated and any aliasing |
|
__construct ( string $pod = null, mixed $id = null ) : Pods |
Constructor - Pods Framework core |
|
__get ( $name ) : mixed |
Handle variables that have been deprecated and PodsData vars |
|
add ( array | string $data = null, mixed $value = null ) : integer |
Add an item to a Pod by giving an array of field data or set a specific field to
a specific value if you're just wanting to add a new item but only set one field. |
|
add_to ( string $field, mixed $value, integer $id = null ) : integer |
Add an item to the values of a relationship field, add a value to a number field (field+1), add time to a date field, or add text to a text field |
|
current ( ) : mixed | boolean |
Get current Iterator row |
|
data ( ) : array | boolean |
Return an array of all rows returned from a find() call. |
|
delete ( integer $id = null ) : boolean |
Delete an item |
|
display ( string | array $name, boolean $single = null ) : string | null | false |
Return the output for a field. If you want the raw value for use in PHP for custom manipulation,
you will want to use field() instead. This function will automatically convert arrays into a
list of text such as "Rick, John, and Gary" |
|
do_magic_tags ( string $code ) : string |
Replace magic tags with their values |
|
duplicate ( integer $id = null ) : integer | boolean |
Duplicate an item |
|
exists ( ) : boolean |
Whether a Pod item exists or not when using fetch() or construct with an ID or slug |
|
export ( array $fields = null, integer $id = null, $format = null ) : array | boolean |
Export an item's data |
|
export_data ( array $params = null ) : array |
Export data from all items |
|
fetch ( integer $id = null, boolean $explicit_set = true ) : array |
Fetch an item from a Pod. If $id is null, it will return the next item in the list after running find(). |
|
field ( string | array $name, boolean $single = null, boolean $raw = false ) : mixed | null |
Return the value for a field. |
|
fields ( null $field = null, null $option = null ) : boolean | mixed |
Return field array from a Pod, a field's data, or a field option |
|
filters ( $params = null ) : string |
Return a filter form for searching a Pod |
|
find ( array $params = null, integer $limit = 15, string $where = null, string $sql = null ) : Pods |
Find items of a pod, much like WP_Query, but with advanced table handling. |
|
first_id ( array $params_override = null ) : integer |
Return the first item ID |
|
form ( array $params = null, string $label = null, string $thank_you = null ) : boolean | mixed |
Embed a form to add / edit a pod item from within your theme. Provide an array of $fields to include
and override options where needed. For WP object based Pods, you can pass through the WP object
field names too, such as "post_title" or "post_content" for example. |
|
has ( string $field, mixed $value, integer $id = null ) : boolean |
Check if an item field has a specific value in it |
|
helper ( string $helper, string $value = null, string $name = null ) : mixed |
Run a helper within a Pod Page or WP Template |
|
id ( ) : integer |
Return the item ID |
|
import ( mixed $import_data, boolean $numeric_mode = false, string $format = null ) : array |
Import data / Save multiple rows of data at once |
|
index ( ) : string |
Return the item name |
|
input ( string | array $field, $input_name = null, mixed $value = '__null' ) : string |
Return a field input for a specific field |
|
is ( string $field, mixed $value, integer $id = null ) : boolean |
Check if an item field is a specific value |
|
is_iterator ( ) : boolean |
Check if in Iterator mode |
|
key ( ) : integer | boolean |
Get current Iterator key |
|
last_id ( array $params_override = null ) : integer |
Return the last item ID |
|
next ( ) : void | boolean |
Move onto the next Iterator row |
|
next_id ( integer $id = null, $params_override = null ) : integer |
Return the next item ID, loops at the first id to return the last |
|
nth ( integer | string $nth = null ) : boolean |
Fetch the nth state |
|
pagination ( $params = null ) : string |
Display the pagination controls, types supported by default
are simple, paginate and advanced. The base and format parameters
are used only for the paginate view. |
|
position ( ) : integer |
Fetch the current position in the loop (starting at 1) |
|
prev_id ( integer $id = null, array $params_override = null ) : integer |
Return the previous item ID, loops at the last id to return the first |
|
raw ( string | array $name, boolean $single = null ) : string | null | false |
Return the raw output for a field If you want the raw value for use in PHP for custom manipulation,
you will want to use field() instead. This function will automatically convert arrays into a
list of text such as "Rick, John, and Gary" |
|
remove_from ( string $field, mixed $value = null, integer $id = null ) : integer |
Remove an item from the values of a relationship field, remove a value from a number field (field-1), remove time to a date field |
|
reset ( integer $row = null ) : Pods |
(Re)set the MySQL result pointer |
|
reset_pod ( ) : boolean |
Reset Pod |
|
rewind ( ) : void | boolean |
Rewind Iterator |
|
row ( ) : array |
Return row array for an item |
|
save ( array | string $data = null, mixed $value = null, integer $id = null, array $params = null ) : integer |
Save an item by giving an array of field data or set a specific field to a specific value. |
|
stop_iterator ( ) : void |
Turn off Iterator mode to off |
|
template ( $template_name, string $code = null, boolean $deprecated = false ) : mixed |
Display the page template |
|
total ( ) : integer |
Fetch the total row count returned by the last call to find(), based on the 'limit' parameter set. |
|
total_found ( ) : integer |
Fetch the total amount of rows found by the last call to find(), regardless of the 'limit' parameter set. |
|
total_pages ( null | integer $limit = null, null | integer $offset = null, null | integer $total = null ) : integer |
Fetch the total number of pages, based on total rows found and the last find() limit |
|
ui ( mixed $options = null, boolean $amend = false ) : PodsUI | void |
Generate UI for Data Management |
|
valid ( ) : boolean |
Whether this Pod object is valid or not |
|
view ( array $fields = null ) : mixed |
|
|
zebra ( ) : boolean |
Fetch the zebra switch |
|