Back to BaseController class

Method addModelPath

public static void
addModelPath
(mixed $path, mixed $prefix = '')
Adds to the stack of model paths in LIFO order.
Parameters
  • mixed $path The directory (string), or list of directories (array) to add.
  • string $prefix A prefix for models
Returns
  • void
Since
  • 3.0
Deprecated
  • 5.0

Method addModelPath - Source code

/**
 * Adds to the stack of model paths in LIFO order.
 *
 * @param   mixed   $path    The directory (string), or list of directories (array) to add.
 * @param   string  $prefix  A prefix for models
 *
 * @return  void
 *
 * @since   3.0
 * @deprecated  5.0 See \Joomla\CMS\MVC\Model\LegacyModelLoaderTrait::getInstance
 */
public static function addModelPath($path, $prefix = '')
{
    BaseModel::addIncludePath($path, $prefix);
}