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

  • Taxonomy

Class Taxonomy

Wordpress Taxonomy entity.

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

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

Methods summary

public
# __construct( stdClass $base, Tev\Term\Factory $termFactory )

Constructor.

Constructor.

Parameters

$base
Underlying taxonomy object
$termFactory
Term factory
public string
# getName( )

Get the taxonomy name.

Get the taxonomy name.

Returns

string
public string
# getPluralLabel( )

Get the taxonomy plural label.

Get the taxonomy plural label.

Returns

string
public string
# getSingularLabel( )

Get the taxonomy singular label.

Get the taxonomy singular label.

Returns

string
public Tev\Term\Model\Term[]
# getTerms( boolean $topLevel = false, array $options = array() )

Get all Terms in this taxonomy.

Get all Terms in this taxonomy.

Parameters

$topLevel
Whether or not to just get top level terms
$options
Optional. Same options as passed to get_terms()

Returns

Tev\Term\Model\Term[]
Array of terms
public array[\Tev\Term\Model\Term]
# getTermsForPost( Tev\Post\Model\AbstractPost $post )

Get all terms in this taxonomy for the given post.

Get all terms in this taxonomy for the given post.

Parameters

$post
Post object to get terms for

Returns

array[\Tev\Term\Model\Term]
Array of terms
public boolean
# isHierarchical( )

Check whether or not this taxonomy is heirarchical.

Check whether or not this taxonomy is heirarchical.

Returns

boolean
True if heirarchical, false if not
public stdClass
# getBaseObject( )

Get the underlying taxonomy object.

Get the underlying taxonomy object.

Returns

stdClass

Implementation of

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