Back to CMSApplication class

Method getPathway

public \Joomla\CMS\Pathway\Pathway
getPathway
()
Returns the application Pathway object.
Returns
  • \Joomla\CMS\Pathway\Pathway
Since
  • 3.2

Method getPathway - Source code

/**
 * Returns the application Pathway object.
 *
 * @return  Pathway
 *
 * @since   3.2
 */
public function getPathway()
{
    if (!$this->pathway) {
        $resourceName = ucfirst($this->getName()) . 'Pathway';
        if (!$this->getContainer()->has($resourceName)) {
            throw new \RuntimeException(Text::sprintf('JLIB_APPLICATION_ERROR_PATHWAY_LOAD', $this->getName()), 500);
        }
        $this->pathway = $this->getContainer()->get($resourceName);
    }
    return $this->pathway;
}