|
| __construct ($cidName='cid', $config=array()) |
|
| setDebugSql ($b) |
|
| getName () |
|
| setState ($property, $value=null) |
|
| getState ($property=null, $default=null) |
|
| getTable ($name= '', $prefix= 'Table', $options=array()) |
|
| setIdName ($idName) |
|
| getIdName () |
|
| getId () |
|
| setId ($id) |
|
| setMainTable ($maintablename, $maintable=0) |
|
| getDefaultOrdering () |
|
| addvalidOrderingFieldName ($add) |
|
| removevalidOrderingFieldName ($name) |
|
| setDefaultValidOrderingFields ($defaultTable=null) |
|
| _getOrdering ($preTable='') |
|
| checkFilterOrder ($toCheck, $view=0, $task= '') |
|
| checkValidOrderingFieldName ($toCheck) |
|
| checkFilterDir ($toCheck, $view=0, $task= '') |
|
| getPagination ($perRow=5) |
|
| setPaginationLimits () |
|
| getTotal () |
|
| setGetCount ($withCount) |
|
| exeSortSearchListQuery ($object, $select, $joinedTables, $whereString= '', $groupBy= '', $orderBy= '', $filter_order_Dir= '', $nbrReturnProducts=false) |
|
| emptyCache () |
|
| getData ($id=0) |
|
| store (&$data) |
|
| remove ($ids) |
|
| setToggleName ($togglesName) |
|
| toggle ($field, $val=NULL, $cidname=0, $tablename=0, $view=false) |
|
| move ($direction, $filter=null) |
|
| saveorder ($cid=array(), $order, $filter=null) |
|
| addImages ($obj, $limit=0) |
|
| resetErrors () |
|
| __toString () |
|
| get ($prop, $def=null) |
|
| set ($prop, $value=null) |
|
| setProperties ($props) |
|
VmModel::__construct |
( |
|
$cidName = 'cid' , |
|
|
|
$config = array() |
|
) |
| |
static VmModel::_createFileName |
( |
|
$type, |
|
|
|
$parts = array() |
|
) |
| |
|
staticprotected |
Create the filename for a resource
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
string | $type | The resource type to create the filename for. |
array | $parts | An associative array of filename information. |
- Returns
- string The filename
- Since
- 11.1
VmModel::_createTable |
( |
|
$name, |
|
|
|
$prefix = 'Table' , |
|
|
|
$config = array() |
|
) |
| |
|
protected |
Method to load and return a model object.
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
string | $name | The name of the view |
string | $prefix | The class prefix. Optional. |
array | $config | Configuration settings to pass to JTable::getInstance |
- Returns
- mixed Model object or boolean false if failed
- Since
- 11.1
- See also
- JTable::getInstance
VmModel::_getList |
( |
|
$query, |
|
|
|
$limitstart = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
|
protected |
Gets an array of objects from the results of database query.
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
string | $query | The query. |
integer | $limitstart | Offset. |
integer | $limit | The number of records. |
- Returns
- array An array of results.
- Since
- 11.1
VmModel::_getListCount |
( |
|
$query | ) |
|
|
protected |
Returns a record count for the query
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
- Returns
- integer Number of rows for query
- Since
- 11.1
VmModel::_getOrdering |
( |
|
$preTable = '' | ) |
|
VmModel::addImages |
( |
|
$obj, |
|
|
|
$limit = 0 |
|
) |
| |
Since an object like product, category dont need always an image, we can attach them to the object with this function The parameter takes a single product or arrays of products, look for BE/views/product/view.html.php for an exampel using it
- Author
- Max Milbers
- Parameters
-
object | $obj | some object with a _medias xref table |
static VmModel::addIncludePath |
( |
|
$path = '' , |
|
|
|
$prefix = '' |
|
) |
| |
|
static |
Add a directory where JModel should search for models. You may either pass a string or an array of directories.
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
mixed | $path | A path or array[sting] of paths to search. |
string | $prefix | A prefix for models. |
- Returns
- array An array with directory elements. If prefix is equal to '', all directories are returned.
- Since
- 11.1
static VmModel::addTablePath |
( |
|
$path | ) |
|
|
static |
Adds to the stack of model table paths in LIFO order.
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
mixed | $path | The directory as a string or directories as an array to add. |
- Returns
- void
- Since
- 12.2
VmModel::addvalidOrderingFieldName |
( |
|
$add | ) |
|
VmModel::checkFilterDir |
( |
|
$toCheck, |
|
|
|
$view = 0 , |
|
|
|
$task = '' |
|
) |
| |
VmModel::checkFilterOrder |
( |
|
$toCheck, |
|
|
|
$view = 0 , |
|
|
|
$task = '' |
|
) |
| |
VmModel::checkValidOrderingFieldName |
( |
|
$toCheck | ) |
|
VmModel::exeSortSearchListQuery |
( |
|
$object, |
|
|
|
$select, |
|
|
|
$joinedTables, |
|
|
|
$whereString = '' , |
|
|
|
$groupBy = '' , |
|
|
|
$orderBy = '' , |
|
|
|
$filter_order_Dir = '' , |
|
|
|
$nbrReturnProducts = false |
|
) |
| |
exeSortSearchListQuery
- Author
- Max Milbers
-
Patrick Kohl
- Parameters
-
boolean | $object | use single result array = 2, assoc. array = 1 or object list = 0 as return value |
string | $select | the fields to select |
string | $joinedTables | the string of the joined tables or the table |
string | $whereString | for the where condition |
string | $groupBy | |
string | $orderBy | |
string | $filter_order_Dir | |
VmModel::getData |
( |
|
$id = 0 | ) |
|
VmModel::getDefaultOrdering |
( |
| ) |
|
static VmModel::getInstance |
( |
|
$type, |
|
|
|
$prefix = '' , |
|
|
|
$config = array() |
|
) |
| |
|
static |
Returns a Model object, always creating it
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- 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
- mixed A model object or false on failure
- Since
- 11.1
static VmModel::getModel |
( |
|
$name = false | ) |
|
|
static |
- Author
- Patrick Kohl
-
Max Milbers
Method to get the model name
The model name. By default parsed using the classname or it can be set by passing a $config['name'] in the class constructor
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Returns
- string The name of the model
- Since
- 12.2
- Exceptions
-
VmModel::getPagination |
( |
|
$perRow = 5 | ) |
|
Loads the pagination
- Author
- Max Milbers
VmModel::getState |
( |
|
$property = null , |
|
|
|
$default = null |
|
) |
| |
Method to get model state variables
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
string | $property | Optional parameter name |
mixed | $default | Optional default value |
- Returns
- object The property where specified, the state object where omitted
- Since
- 11.1
VmModel::getTable |
( |
|
$name = '' , |
|
|
|
$prefix = 'Table' , |
|
|
|
$options = array() |
|
) |
| |
Method to get a table object, load it if necessary.
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
string | $name | The table name. Optional. |
string | $prefix | The class prefix. Optional. |
array | $options | Configuration array for model. Optional. |
- Returns
- JTable A JTable object
- Since
- 11.1
Gets the total number of entries TODO filters and search ar not set
- Author
- Max Milbers
- Returns
- int Total number of entries in the database
static VmModel::joinLangLikeField |
( |
|
$searchField, |
|
|
|
$keyword |
|
) |
| |
|
static |
static VmModel::joinLangLikeFields |
( |
|
$langFields, |
|
|
|
$keyword |
|
) |
| |
|
static |
static VmModel::joinLangSelectFields |
( |
|
$langFields, |
|
|
|
$as = true |
|
) |
| |
|
static |
static VmModel::joinLangTables |
( |
|
$tablename, |
|
|
|
$prefix, |
|
|
|
$on, |
|
|
|
$method = 0 |
|
) |
| |
|
static |
VmModel::move |
( |
|
$direction, |
|
|
|
$filter = null |
|
) |
| |
Original From Joomla Method to move a weblink @ Author Kohl Patrick $filter the field to group by public
- Returns
- boolean True on success
- Since
- 1.5
VmModel::populateState |
( |
| ) |
|
|
protected |
Method to auto-populate the model state.
This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the model configuration flag to ignore the request is set.
- Returns
- void
- Note
- Calling getState in this method will result in recursion.
- Since
- 11.1
Delete all record ids selected
- Author
- Max Milbers
- Returns
- boolean True is the delete was successful, false otherwise.
VmModel::removevalidOrderingFieldName |
( |
|
$name | ) |
|
VmModel::saveorder |
( |
|
$cid = array() , |
|
|
|
$order, |
|
|
|
$filter = null |
|
) |
| |
Original From Joomla Method to move a weblink @ Author Kohl Patrick $filter the field to group by public
- Returns
- boolean True on success
- Since
- 1.5
VmModel::setDebugSql |
( |
|
$b | ) |
|
VmModel::setDefaultValidOrderingFields |
( |
|
$defaultTable = null | ) |
|
This function sets the valid ordering fields for this model with the default table attributes
- Author
- Max Milbers
- Parameters
-
unknown_type | $defaultTable | |
VmModel::setGetCount |
( |
|
$withCount | ) |
|
Resets the id and data
- Author
- Max Milbers
VmModel::setIdName |
( |
|
$idName | ) |
|
VmModel::setMainTable |
( |
|
$maintablename, |
|
|
|
$maintable = 0 |
|
) |
| |
VmModel::setPaginationLimits |
( |
| ) |
|
VmModel::setState |
( |
|
$property, |
|
|
|
$value = null |
|
) |
| |
Method to set model state variables
- Copyright
- Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. GNU General Public License version 2 or later; see LICENSE
- Parameters
-
string | $property | The name of the property. |
mixed | $value | The value of the property to set or null. |
- Returns
- mixed The previous value of the property or null if not set.
- Since
- 12.2
VmModel::setToggleName |
( |
|
$togglesName | ) |
|
VmModel::store |
( |
& |
$data | ) |
|
VmModel::toggle |
( |
|
$field, |
|
|
|
$val = NULL , |
|
|
|
$cidname = 0 , |
|
|
|
$tablename = 0 , |
|
|
|
$view = false |
|
) |
| |
toggle (0/1) a field or invert by $val for multi IDS;
- Author
- Patrick Kohl
- Parameters
-
string | $field | the field to toggle |
string | $postName | the name of id Post (Primary Key in table Class constructor) |
VmModel::$__state_set = null |
|
protected |
VmModel::$_cache = array() |
|
staticprivate |
VmModel::$_cidName = 'cid' |
VmModel::$_limitStart = 0 |
VmModel::$_maintable = '' |
VmModel::$_maintablename = '' |
VmModel::$_maxItems = 1000 |
|
protected |
VmModel::$_noLimit = false |
VmModel::$_pagination = 0 |
VmModel::$_selectedOrderingDir = 'DESC' |
VmModel::$_tablePreFix = '' |
VmModel::$_togglesName = null |
VmModel::$_validFilterDir = array('ASC','DESC') |
VmModel::$_validOrderingFieldName = array() |
VmModel::$_vmmodels = array() |
|
staticprivate |
VmModel::$_withCount = true |
|
private |
VmModel::$event_clean_cache = null |
|
protected |
The documentation for this class was generated from the following file:
- administrator/components/com_virtuemart/helpers/vmmodel.php