Back to Joomla project (class list)

Class LegacyModelLoaderTrait - list of methods

Trait which contains the legacy getInstance functionality
Package: Joomla\CMS\MVC\Model
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
Located at: Joomla/MVC/Model/LegacyModelLoaderTrait.php
Project: Joomla

Method Summary

protected static string
(mixed $type, mixed $parts = array())

Create the filename for a resource
Parameters
  • string $type The resource type to create the filename for.
  • array $parts An associative array of filename information.
Returns
  • string The filename
Since
  • 3.0
Deprecated
  • 5.0
Show source code of this method: _createFileName Source Code

public static self|bool
(mixed $type, mixed $prefix = '', mixed $config = array())

Returns a Model object, always creating it
Parameters
  • string $type The model type to instantiate
  • string $prefix Prefix for the model class name. Optional.
  • array $config Configuration array for model. Optional.
Returns
  • self|bool A \JModelLegacy instance or false on failure
Since
  • 3.0
Deprecated
  • 5.0
Show source code of this method: getInstance Source Code

public static void
(mixed $path)

Adds to the stack of model table paths in LIFO order.
Parameters
  • mixed $path The directory as a string or directories as an array to add.
Returns
  • void
Since
  • 3.0
Deprecated
  • 5.0
Show source code of this method: addTablePath Source Code

private static \Joomla\CMS\MVC\Model\ModelInterface|null
(mixed $type, mixed $prefix = '', mixed $config = [])

Returns a Model object by loading the component from the prefix.
Parameters
  • string $type The model type to instantiate
  • string $prefix Prefix for the model class name. Optional.
  • array $config Configuration array for model. Optional.
Returns
  • \Joomla\CMS\MVC\Model\ModelInterface|null A ModelInterface instance or null on failure
Since
  • 4.0.0
Deprecated
  • 5.0
Show source code of this method: createModelFromComponent Source Code

Tags Summary

Since
4.0.0
Deprecated
5.0
Will be removed without replacement