3ev Core Wordpress library API
  • Namespace
  • Class

Namespaces

  • Tev
    • Application
      • Bootstrap
    • Author
      • Model
    • Contracts
    • Database
      • CustomTables
    • Field
      • Model
      • Util
    • Plugin
      • Action
      • Shortcode
    • Post
      • Model
      • Repository
    • Taxonomy
      • Model
      • Repository
    • Term
      • Model
      • Repository
    • Util
    • View
      • Exception
  • None

Classes

  • AbstractField
  • AuthorField
  • BasicField
  • DateField
  • FileField
  • FlexibleContentField
  • GoogleMapField
  • ImageField
  • NullField
  • NumberField
  • PostField
  • RepeaterField
  • SelectField
  • TaxonomyField

Class SelectField

Select field.

A select field can have one or more objects selected.

Tev\Field\Model\AbstractField implements Tev\Contracts\WordpressWrapperInterface
Extended by Tev\Field\Model\SelectField
Namespace: Tev\Field\Model
Located at Tev/Field/Model/SelectField.php

Methods summary

public mixed
# getValue( )

Get the selected options.

Get the selected options.

Returns

mixed
Single selected option, or array of selected options
public mixed
# selected( )

Get the selected option values.

Get the selected option values.

Returns

mixed
Single selected option value, or array of selected options values
public array
# options( )

Get all available options from this select.

Get all available options from this select.

Returns

array
Key-value pairs (values to labels)
public boolean
# isSelected( mixed $val )

Check if the given value is selected.

Check if the given value is selected.

Parameters

$val
Value

Returns

boolean
True if selected, false if not
public boolean
# isMulti( )

Check if this is a multi-select or not.

Check if this is a multi-select or not.

Returns

boolean
True if multi-select, false if not
public string
# __toString( )

Get a string representation of this selected options.

Get a string representation of this selected options.

If this is a multi-select, values will be comma-space separated.

Returns

string

Overrides

Tev\Field\Model\AbstractField::__toString

Methods inherited from Tev\Field\Model\AbstractField

__construct(), getBaseObject(), getKey(), getName(), val()

Properties summary

Properties inherited from Tev\Field\Model\AbstractField

$base

3ev Core Wordpress library API API documentation generated by ApiGen