Yoast\WP\SEO\Schema_Aggregator\Application
Aggregate_Site_Schema_Map_Command_Handler::handle
Handles the Aggregate_Site_Schema_Map_Command.
Метод класса: Aggregate_Site_Schema_Map_Command_Handler{}
Хуков нет.
Возвращает
Строку. The schema map xml.
Использование
$Aggregate_Site_Schema_Map_Command_Handler = new Aggregate_Site_Schema_Map_Command_Handler(); $Aggregate_Site_Schema_Map_Command_Handler->handle( $command ): string;
- $command(Aggregate_Site_Schema_Map_Command) (обязательный)
- The command.
Код Aggregate_Site_Schema_Map_Command_Handler::handle() Aggregate Site Schema Map Command Handler::handle Yoast 27.7
public function handle( Aggregate_Site_Schema_Map_Command $command ): string {
$schema_map_repository = $this->schema_map_repository_factory->get_repository( $this->indexable_helper->should_index_indexables() );
$indexable_counts = $schema_map_repository->get_indexable_count_per_post_type( $command->get_post_types() );
$schema_map = $this->schema_map_builder
->with_repository( $schema_map_repository )
->build( $indexable_counts );
return $this->schema_map_xml_renderer->render( $schema_map );
}