SproutCMS

This is the code documentation for the SproutCMS project

function tag()

Generates an HTML opening tag, and possibly its closing tag, depending on the params specified

You can specify either HTML or plain-text content, but not both

Usage

string Fb::tag ( string $name , array $attrs , array $params );

Arguments

  1. string $name
    The name of the tag, e.g. 'textarea'
  2. array $attrs
    Attributes for the tag, e.g. ['class' => 'super-input', 'style' => 'font-style: italic']
  3. array $params
    Additional options, as follows:
           - 'html' (string): Specifies HTML content between the opening and closing tags, which MUST be
             properly encoded.
           - 'plain' (string): Specifies non-encoded content content between the opening and closing tags.

Return value

  • string
    The generated tag