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 ImageField

Image field.

Provides access to different image sizes and base information where possible.

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

Methods summary

public integer
# width( )

Get full image width.

Get full image width.

May be 0 depending on field config.

Returns

integer
public integer
# height( )

Get full image height.

Get full image height.

May be 0 depending on field config.

Returns

integer
public string
# thumbnailUrl( )

Get the image thumbnail URL if possible.

Get the image thumbnail URL if possible.

Returns

string
URL or empty string
public string
# mediumUrl( )

Get the image medium URL if possible.

Get the image medium URL if possible.

Returns

string
URL or empty string
public string
# largeUrl( )

Get the image large URL if possible.

Get the image large URL if possible.

Returns

string
URL or empty string
public string
# sizeUrl( string $size )

Get an image URL of a specic size.

Get an image URL of a specic size.

Parameters

$size
Image size (e.g thumbnail, large or custom size)

Returns

string
Image URL
protected
# normalize( )

Normalize attachment data, depending on how the underlying field is configured.

Normalize attachment data, depending on how the underlying field is configured.

Throws

Exception
If invalid return_format is found

Overrides

Tev\Field\Model\FileField::normalize

Methods inherited from Tev\Field\Model\FileField

__construct(), caption(), description(), getValue(), id(), title(), url()

Methods inherited from Tev\Field\Model\AbstractField

__toString(), getBaseObject(), getKey(), getName(), val()

Properties summary

Properties inherited from Tev\Field\Model\FileField

$atCaption, $atDescription, $atId, $atTitle, $atUrl

Properties inherited from Tev\Field\Model\AbstractField

$base

3ev Core Wordpress library API API documentation generated by ApiGen