PHP Trait Bolt\Storage\Entity\ContentTaxonomyTrait

This is a breakout of the old Bolt\Content class and serves two main purposes: * Maintain backward compatibility for Bolt\Content through the remainder of the 2.x development/release life-cycle * Attempt to break up former functionality into sections of code that more resembles Single Responsibility Principles These traits should be considered transitional, the functionality in the process of refactor, and not representative of a valid approach.
Author: Gawain Lynch ([email protected])
Show file Open project: bolt/bolt

Public Methods

Method Description
getTaxonomy ( string $taxonomyType = null ) NOTE: This probably needs to implement, or be called by, Bolt\Storage::getTaxonomy()
setGroup ( string $group, string $name, string $taxonomytype, integer $sortorder ) : void Set the 'group', 'groupname' and 'sortorder' properties of the current object.
setTaxonomy ( string $taxonomyType, string | array $slug, string $name = '', integer $sortorder ) : boolean Set a taxonomy for the current object.
sortTaxonomy ( ) : void Sort the taxonomy of the current object, based on the order given in taxonomy.yml.

Method Details

getTaxonomy() public method

NOTE: This probably needs to implement, or be called by, Bolt\Storage::getTaxonomy()
public getTaxonomy ( string $taxonomyType = null )
$taxonomyType string

setGroup() public method

Set the 'group', 'groupname' and 'sortorder' properties of the current object.
public setGroup ( string $group, string $name, string $taxonomytype, integer $sortorder ) : void
$group string
$name string
$taxonomytype string
$sortorder integer
return void

setTaxonomy() public method

Set a taxonomy for the current object.
public setTaxonomy ( string $taxonomyType, string | array $slug, string $name = '', integer $sortorder ) : boolean
$taxonomyType string
$slug string | array
$name string
$sortorder integer
return boolean

sortTaxonomy() public method

Sort the taxonomy of the current object, based on the order given in taxonomy.yml.
public sortTaxonomy ( ) : void
return void