phpbb\textformatter\s9e\utils::generate_quote PHP Method

generate_quote() public method

public generate_quote ( $text, array $attributes = [] )
$attributes array
    public function generate_quote($text, array $attributes = array())
    {
        $quote = '[quote';
        if (isset($attributes['author'])) {
            // Add the author as the BBCode's default attribute
            $quote .= '=' . $this->enquote($attributes['author']);
            unset($attributes['author']);
        }
        foreach ($attributes as $name => $value) {
            $quote .= ' ' . $name . '=' . $this->enquote($value);
        }
        $quote .= ']' . $text . '[/quote]';
        return $quote;
    }