Back to MVCFactory class

Method setFormFactoryOnObject

private void
setFormFactoryOnObject
(mixed $object)
Sets the internal form factory on the given object.
Parameters
  • object $object The object
Returns
  • void
Since
  • 4.0.0
Class: MVCFactory
Project: Joomla

Method setFormFactoryOnObject - Source code

/**
 * Sets the internal form factory on the given object.
 *
 * @param   object  $object  The object
 *
 * @return  void
 *
 * @since   4.0.0
 */
private function setFormFactoryOnObject($object)
{
    if (!$object instanceof FormFactoryAwareInterface) {
        return;
    }
    try {
        $object->setFormFactory($this->getFormFactory());
    } catch (\UnexpectedValueException $e) {
        // Ignore it
    }
}