spot_renderer = $spot_renderer;
}
/**
* Renders the admin banner sidebar.
*
* @param WPSEO_Admin_Banner_Sidebar $banner_sidebar The sidebar to render.
*
* @return string
*/
public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) {
return sprintf( '
',
$banner_sidebar->get_title(),
$this->render_banner_spots( $banner_sidebar->get_banner_spots() )
);
}
/**
* Renders the admin banner spots.
*
* @param WPSEO_Admin_Banner_Spot[] $banner_spots The banner spots to render.
*
* @return string
*/
protected function render_banner_spots( array $banner_spots ) {
$return = '';
foreach ( $banner_spots as $banner_spot ) {
$return .= $this->spot_renderer->render( $banner_spot );
}
return $return;
}
}