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

  • Term

Class Term

Wordpress Term entity.

Provides a nicely object-oriented interface to a Wordpress taxonomy term.

Tev\Term\Model\Term implements Tev\Contracts\WordpressWrapperInterface
Namespace: Tev\Term\Model
Located at Tev/Term/Model/Term.php

Methods summary

public
# __construct( WP_Term $base, Tev\Taxonomy\Model\Taxonomy $taxonomy, Tev\Term\Factory $termFactory )

Constructor.

Constructor.

Inject dependencies.

Parameters

$base
Base term oject
$taxonomy
Term taxonomy
$termFactory
Term factory
public integer
# getId( )

Get the term ID.

Get the term ID.

Returns

integer
public string
# getName( )

Get the term name.

Get the term name.

Returns

string
public string
# getSlug( )

Get the term slug.

Get the term slug.

Returns

string
public Tev\Taxonomy\Model\Taxonomy
# getTaxonomy( )

Get the taxonomy for this term.

Get the taxonomy for this term.

Returns

Tev\Taxonomy\Model\Taxonomy
public string
# getDescription( )

Get the term description.

Get the term description.

Returns

string
public string
# getUrl( array $query = array() )

Get term URL.

Get term URL.

Parameters

$query
Query string args. Key value pairs

Returns

string
public integer|null
# getParentId( )

Get the parent term ID of this term.

Get the parent term ID of this term.

Returns

integer|null
public Tev\Term\Model\Term
# getParent( )

Get the parent term of this term.

Get the parent term of this term.

Returns

Tev\Term\Model\Term
public boolean
# hasParent( )

Check whether or not this Term has a parent Term.

Check whether or not this Term has a parent Term.

Returns

boolean
True if has a parent, false if not
public Tev\Term\Model\Term[]
# getChildren( )

Return array of direct child terms of this term.

Return array of direct child terms of this term.

Returns

Tev\Term\Model\Term[]
public WP_Term
# getBaseObject( )

Get the underlying term object.

Get the underlying term object.

Returns

WP_Term

Implementation of

Tev\Contracts\WordpressWrapperInterface::getBaseObject()
3ev Core Wordpress library API API documentation generated by ApiGen