Controller::render()
Summary
Render the template and return it as a string
Return
(string) The rendered template
Source
File: src/BigCommerce/Templates/Controller.php
public function render() { $template = $this->get_template( $this->template ); $data = $this->get_data(); /** * Filter the data passed in to a template * * @param array $data The data for the template * @param string $template The template path * @param array $options The options from the template controller */ $data = apply_filters( 'bigcommerce/template/data', $data, $this->template, $this->options ); /** * Filter the data passed in to a template * * @param array $data The data for the template * @param string $template The template path * @param array $options The options from the template controller */ $data = apply_filters( 'bigcommerce/template=' . $this->template . '/data', $data, $this->template, $this->options ); /** * Filter the rendered output of the template * * @param string $output The rendered template * @param string $template The template path * @param array $data The data passed to the template * @param array $options The options from the template controller */ $output = apply_filters( 'bigcommerce/template=' . $this->template . '/output', $template->render( $data ), $this->template, $data, $this->options ); return $this->wrap( $output ); }