Function __global->paragraph

Definitions

sources/templates.php

  • Get the Tempcode for a paragraph. This function should only be used with escaped text strings that need to be put into a paragraph, not with sections of HTML. Remember, paragraphs are literally that, and should only be used with templates that don't assume that they are going to put the given parameters into paragraphs themselves.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$text mixed No No required parameter N/A N/A The text to put into the paragraph, provided in HTML format (string or Tempcode)
$guid string No No Blank (empty string) N/A N/A GUID for call
$class ?string No No Null N/A N/A CSS classname (null: none)

Returns

  • The generated paragraph
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the Tempcode for a paragraph. This function should only be used with escaped text strings that need to be put into a paragraph, not with sections of HTML. Remember, paragraphs are literally that, and should only be used with templates that don't assume that they are going to put the given parameters into paragraphs themselves.
 *
 * @param  mixed $text The text to put into the paragraph, provided in HTML format (string or Tempcode)
 * @param  string $guid GUID for call
 * @param  ?string $class CSS classname (null: none)
 * @return Tempcode The generated paragraph
 */

function paragraph($text, string $guid = '', ?string $class = null) : object