Back to AbstractRenderer class

Method getDocument

public \Joomla\CMS\Document\Document
getDocument
()
Retrieve the Document instance attached to this renderer
Returns
  • \Joomla\CMS\Document\Document
Since
  • 4.0.0

Method getDocument - Source code

/**
 * Retrieve the Document instance attached to this renderer
 *
 * @return  Document
 *
 * @since   4.0.0
 */
public function getDocument() : Document
{
    // Load the document if not already
    if (!$this->document) {
        $this->document = $this->loadDocument();
    }
    return $this->document;
}