PHP Class Inpsyde\MultilingualPress\Relations\Post\Search\StatusAwareSearchResultsView

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Relations\Post\Search\SearchResultsView
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( Inpsyde\MultilingualPress\Relations\Post\Search\Search $search ) Constructor. Sets up the properties.
render ( RelationshipContext $context ) : void Renders the markup for the search results according to the given context.

Private Methods

Method Description
get_post_title ( WP_Post $post ) : string Returns the title of the given post, including the status if not published.
get_translated_status ( string $status ) : string Returns the according translation of the given post status, if available.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( Inpsyde\MultilingualPress\Relations\Post\Search\Search $search )
$search Inpsyde\MultilingualPress\Relations\Post\Search\Search Search object.

render() public method

Renders the markup for the search results according to the given context.
Since: 3.0.0
public render ( RelationshipContext $context ) : void
$context Inpsyde\MultilingualPress\Relations\Post\RelationshipContext Relationship context data object.
return void