LegacyModelLoaderTrait
Trait which contains the legacy getInstance functionality
since |
4.0.0 |
---|---|
deprecated |
4.3 will be removed in 6.0 Will be removed without replacement |
package |
Joomla CMS |
Methods
_createFileName
Create the filename for a resource
_createFileName( type, mixed||string|int parts = []) :
since |
3.0 |
---|---|
deprecated |
4.3 will be removed in 6.0 Will be removed without replacement |
Arguments
- type
string
The resource type to create the filename for.- parts
array<string|int, mixed>
An associative array of filename information.
Response
string
The filename
addTablePath
Adds to the stack of model table paths in LIFO order.
addTablePath( path) :
since |
3.0 |
---|---|
deprecated |
4.3 will be removed in 6.0 Will be removed without replacement. Get the model through the MVCFactory instead |
Arguments
- path
mixed
The directory as a string or directories as an array to add.
Response
void
createModelFromComponent
Returns a Model object by loading the component from the prefix.
createModelFromComponent( type, prefix = '', mixed||string|int config = []) : \Joomla\CMS\MVC\Model\ModelInterface|null
since |
4.0.0 |
---|---|
deprecated |
4.3 will be removed in 6.0 Will be removed without replacement |
Arguments
- type
string
The model type to instantiate- prefix
string
Prefix for the model class name. Optional.- config
array<string|int, mixed>
Configuration array for model. Optional.
Response
ModelInterface|null
A ModelInterface instance or null on failure
getInstance
Returns a Model object, always creating it
getInstance( type, prefix = '', mixed||string|int config = []) : self|bool
since |
3.0 |
---|---|
deprecated |
4.3 will be removed in 6.0 Will be removed without replacement. Get the model through the MVCFactory instead Example: Factory::getApplication->bootComponent('com_xxx')->getMVCFactory()->createModel($type, $prefix, $config); |
Arguments
- type
string
The model type to instantiate- prefix
string
Prefix for the model class name. Optional.- config
array<string|int, mixed>
Configuration array for model. Optional.
Response
self|bool
A \JModelLegacy instance or false on failure