Inpsyde\MultilingualPress\Relations\Post\Search\SearchResultsView::render PHP Method

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
    public function render(RelationshipContext $context);

Usage Example

 /**
  * Initializes the AJAX-based live search.
  *
  * @since 3.0.0
  *
  * @return void
  */
 public function initialize()
 {
     add_action('wp_ajax_' . self::ACTION, function () {
         $context = RelationshipContext::from_request();
         ob_start();
         $this->search_results->render($context);
         wp_send_json_success(['html' => ob_get_clean(), 'remoteSiteId' => $context->remote_site_id()]);
     });
 }
All Usage Examples Of Inpsyde\MultilingualPress\Relations\Post\Search\SearchResultsView::render
SearchResultsView