PHP Класс Mlp_Language_Api

Not complete yet.
Автор: Inpsyde GmbH, toscho
Наследование: implements Mlp_Language_Api_Interface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Inpsyde_Property_List_Interface $data, string $table_name, Inpsyde\MultilingualPress\API\SiteRelations $site_relations, Inpsyde\MultilingualPress\API\ContentRelations $content_relations, wpdb $wpdb, Inpsyde\MultilingualPress\Factory\TypeFactory $type_factory, Inpsyde\MultilingualPress\Common\Request $request ) Constructor.
get_translations ( array $args = [] ) : Inpsyde\MultilingualPress\Common\Type\Translation[] Ask for specific translations with arguments.

Приватные методы

Метод Описание
get_all_language_data ( ) : array
get_post_translation ( integer $content_id, boolean $strict ) : array | boolean Get translation for posts of any post type.
get_post_type_archive_translation ( string $post_type ) : array Get translation for post type archive
prepare_translation_arguments ( array $args ) : array

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Inpsyde_Property_List_Interface $data, string $table_name, Inpsyde\MultilingualPress\API\SiteRelations $site_relations, Inpsyde\MultilingualPress\API\ContentRelations $content_relations, wpdb $wpdb, Inpsyde\MultilingualPress\Factory\TypeFactory $type_factory, Inpsyde\MultilingualPress\Common\Request $request )
$data Inpsyde_Property_List_Interface
$table_name string
$site_relations Inpsyde\MultilingualPress\API\SiteRelations
$content_relations Inpsyde\MultilingualPress\API\ContentRelations
$wpdb wpdb
$type_factory Inpsyde\MultilingualPress\Factory\TypeFactory Type factory object.
$request Inpsyde\MultilingualPress\Common\Request Request object.

get_translations() публичный Метод

Ask for specific translations with arguments.
См. также: prepare_translation_arguments()
public get_translations ( array $args = [] ) : Inpsyde\MultilingualPress\Common\Type\Translation[]
$args array { Optional. If left out, some magic happens. @type int $site_id Base site @type int $content_id post or term_taxonomy ID, *not* term ID @type string $type @see Mlp_Language_Api::get_request_type() @type bool $strict When TRUE (default) only matching exact translations will be included @type string $search_term If you want to translate a search @type string $post_type For post type archives @type bool $include_base Include the base site in returned list }
Результат Inpsyde\MultilingualPress\Common\Type\Translation[] Array of Mlp_Translation instances, site IDs are the keys