PHP 클래스 Mlp_Language_Api

Not complete yet.
저자: Inpsyde GmbH, toscho
상속: implements Mlp_Language_Api_Interface
파일 보기 프로젝트 열기: inpsyde/multilingual-press

공개 메소드들

메소드 설명
__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