Back to Document class

Method setDirection

public \Joomla\CMS\Document\Document
setDirection
(mixed $dir = 'ltr')
Sets the global document direction declaration. Default is left-to-right (ltr).
Parameters
  • string $dir The language direction to be set
Returns
  • \Joomla\CMS\Document\Document instance of $this to allow chaining
Since
  • 1.7.0
Class: Document
Project: Joomla

Method setDirection - Source code

/**
 * Sets the global document direction declaration. Default is left-to-right (ltr).
 *
 * @param   string  $dir  The language direction to be set
 *
 * @return  Document instance of $this to allow chaining
 *
 * @since   1.7.0
 */
public function setDirection($dir = 'ltr')
{
    $this->direction = strtolower($dir);
    return $this;
}