PHP Class Mlp_Term_Translation_Presenter

Author: Inpsyde GmbH, toscho
ファイルを表示 Open project: inpsyde/multilingual-press Class Usage Examples

Public Methods

Method Description
__construct ( Inpsyde\MultilingualPress\API\ContentRelations $content_relations, string $key_base ) Constructor. Set up the properties.
get_current_term ( integer $site_id, integer $term_id ) : integer Return the current term taxonomy ID for the given site and the given term ID in the current site.
get_group_title ( ) : string Return the group title.
get_key_base ( integer $site_id ) : string Term key base for given site.
get_relation_id ( integer $site_id, integer $term_taxonomy_id ) : string Return the relation ID for the given blog ID and term taxonomy ID.
get_site_languages ( ) : array Return the available site languages.
get_taxonomy ( ) : string Return the current taxonomy name.
get_terms_for_site ( integer $site_id ) : array Return the terms for the given type.

Private Methods

Method Description
get_term_from_site ( integer $term_id ) : object Return the term object for the given term ID and the current site.

Method Details

__construct() public method

Constructor. Set up the properties.
public __construct ( Inpsyde\MultilingualPress\API\ContentRelations $content_relations, string $key_base )
$content_relations Inpsyde\MultilingualPress\API\ContentRelations Content relations object.
$key_base string Term key base.

get_current_term() public method

Return the current term taxonomy ID for the given site and the given term ID in the current site.
public get_current_term ( integer $site_id, integer $term_id ) : integer
$site_id integer Blog ID.
$term_id integer Term ID of the currently edited term.
return integer

get_group_title() public method

Return the group title.
public get_group_title ( ) : string
return string

get_key_base() public method

Term key base for given site.
public get_key_base ( integer $site_id ) : string
$site_id integer Blog ID.
return string

get_relation_id() public method

Return the relation ID for the given blog ID and term taxonomy ID.
public get_relation_id ( integer $site_id, integer $term_taxonomy_id ) : string
$site_id integer Blog ID.
$term_taxonomy_id integer Term taxonomy ID.
return string

get_site_languages() public method

Return the available site languages.
public get_site_languages ( ) : array
return array

get_taxonomy() public method

Return the current taxonomy name.
public get_taxonomy ( ) : string
return string

get_terms_for_site() public method

Return the terms for the given type.
public get_terms_for_site ( integer $site_id ) : array
$site_id integer Blog ID.
return array