Yoast\WP\SEO\Schema_Aggregator\Application

Aggregate_Site_Schema_Command_Handler::handle │ public │ Yoast 1.0

Handles the Aggregate_Site_Schema_Command.

Метод класса: Aggregate_Site_Schema_Command_Handler{}

Хуков нет.

Возвращает

array<string>. The aggregated schema.

Использование

$Aggregate_Site_Schema_Command_Handler = new Aggregate_Site_Schema_Command_Handler();
$Aggregate_Site_Schema_Command_Handler->handle( $command ): array;
$command(Aggregate_Site_Schema_Command) (обязательный)
The command.

Код Aggregate_Site_Schema_Command_Handler::handle() Yoast 28.9

public function handle( Aggregate_Site_Schema_Command $command ): array {

	$schema_pieces = $this->schema_piece_repository->get(
		$command->get_page_controls()->get_page(),
		$command->get_page_controls()->get_page_size(),
		$command->get_page_controls()->get_post_type(),
	);

	$aggregated_schema_pieces = $this->schema_piece_aggregator->aggregate( $schema_pieces );
	return $this->schema_response_composer->compose( $aggregated_schema_pieces );
}