Back to FormFactoryAwareTrait class

Method getFormFactory

public \Joomla\CMS\Form\FormFactoryInterface
getFormFactory
()
Get the FormFactoryInterface.
Returns
  • \Joomla\CMS\Form\FormFactoryInterface
Since
  • 4.0.0
-
  • \UnexpectedValueException May be thrown if the FormFactory has not been set.

Method getFormFactory - Source code

/**
 * Get the FormFactoryInterface.
 *
 * @return  FormFactoryInterface
 *
 * @since   4.0.0
 * @throws  \UnexpectedValueException May be thrown if the FormFactory has not been set.
 */
public function getFormFactory() : FormFactoryInterface
{
    if ($this->formFactory) {
        return $this->formFactory;
    }
    throw new \UnexpectedValueException('FormFactory not set in ' . __CLASS__);
}