VirtueMart
3.2.14.9808
|
Public Member Functions | |
__construct () | |
prepareFieldDataSave ($field, &$data, $prefix= '') | |
getUserfield ($id=0, $name= '') | |
getUserfieldValues ($id=null) | |
store (&$data) | |
getUserFieldsFor ($layoutName, $type) | |
getUserFields ($_sec= 'registration', $_switches=array(), $_skip=array('username', 'password', 'password2')) | |
fieldPublished ($_field_name, $_sec='account') | |
getUserFieldsFilled ($_selection, &$_userDataIn=null, $_prefix= '') | |
getIfRequired ($fieldname) | |
remove ($fieldIds) | |
getUserfieldsList ($type=false) | |
_getFilter () | |
_getListQuery () | |
Public Member Functions inherited from VmModel | |
__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 () | |
Public Member Functions inherited from vObject | |
__toString () | |
get ($prop, $def=null) | |
set ($prop, $value=null) | |
setProperties ($props) | |
Static Public Member Functions | |
static | getCoreFields () |
Static Public Member Functions inherited from VmModel | |
static | addTablePath ($path) |
static | addIncludePath ($path= '', $prefix= '') |
static | getInstance ($type, $prefix= '', $config=array()) |
static | getModel ($name=false) |
static | joinLangTables ($tablename, $prefix, $on, $method=0) |
static | joinLangSelectFields ($langFields, $as=true) |
static | joinLangLikeFields ($langFields, $keyword) |
static | joinLangLikeField ($searchField, $keyword) |
Static Public Attributes | |
static | $_cache_ordered |
static | $_cache_named |
Private Member Functions | |
storeFieldValues ($_values, $_id) | |
postData2FieldValues ($titles, $values, $virtuemart_userfield_id) | |
Additional Inherited Members | |
Public Attributes inherited from VmModel | |
$_id = 0 | |
$_data = null | |
$_query = null | |
$_total = null | |
$_pagination = 0 | |
$_limit = 0 | |
$_limitStart = 0 | |
$_maintable = '' | |
$_maintablename = '' | |
$_idName = '' | |
$_cidName = 'cid' | |
$_togglesName = null | |
$_selectedOrderingDir = 'DESC' | |
$_noLimit = false | |
$_tablePreFix = '' | |
$_validOrderingFieldName = array() | |
$_validFilterDir = array('ASC','DESC') | |
Protected Member Functions inherited from VmModel | |
populateState () | |
_createTable ($name, $prefix= 'Table', $config=array()) | |
_getList ($query, $limitstart=0, $limit=0) | |
_getListCount ($query) | |
Static Protected Member Functions inherited from VmModel | |
static | _createFileName ($type, $parts=array()) |
Protected Attributes inherited from VmModel | |
$__state_set = null | |
$name | |
$option = null | |
$state | |
$event_clean_cache = null | |
$_maxItems = 1000 | |
VirtueMartModelUserfields::__construct | ( | ) |
constructs a VmModel setMainTable defines the maintable of the model
VirtueMartModelUserfields::_getFilter | ( | ) |
If a filter was set, get the SQL WHERE clase
VirtueMartModelUserfields::_getListQuery | ( | ) |
VirtueMartModelUserfields::fieldPublished | ( | $_field_name, | |
$_sec = 'account' |
|||
) |
Return a boolean whethe the userfield is enabled in context of $_sec
public
$_field_name | name of the user field such as 'email' |
$_sec | BT or ST, or one of the types of the fields: account, shipment, registration |
Note: this function will return a false result for skipped fields such as agreed, user_is_vendor
when used from shipment method, you can use $userFieldsModel =VmModel::getModel('Userfields'); $type = (($cart->ST == 0) ? 'BT' : 'ST'); if ($userFieldsModel->fieldPublished('zip', $type)) ....
|
static |
VirtueMartModelUserfields::getIfRequired | ( | $fieldname | ) |
Checks if a single field is required, used in the cart
string | $fieldname |
VirtueMartModelUserfields::getUserfield | ( | $id = 0 , |
|
$name = '' |
|||
) |
Retrieve the detail record for the current $id if the data has not already been loaded.
VirtueMartModelUserfields::getUserFields | ( | $_sec = 'registration' , |
|
$_switches = array() , |
|||
$_skip = array('username', 'password', 'password2') |
|||
) |
Retrieve an array with userfield objects
string | $section | The section the fields belong to (e.g. 'registration' or 'account') |
array | $_switches | Array to toggle these options:
|
array | $_skip | Array with fieldsnames to exclude. Default: array('username', 'password', 'password2', 'agreed'), specify array() to skip nothing. |
VirtueMartModelUserfields::getUserFieldsFilled | ( | $_selection, | |
& | $_userDataIn = null , |
||
$_prefix = '' |
|||
) |
VirtueMartModelUserfields::getUserFieldsFor | ( | $layoutName, | |
$type | |||
) |
VirtueMartModelUserfields::getUserfieldsList | ( | $type = false | ) |
Get the userfields for the BE list
VirtueMartModelUserfields::getUserfieldValues | ( | $id = null | ) |
Retrieve the value records for the current $id if available for the current type
Updated by stAn to get userfieldvalues per specific id regardless on this->_id
|
private |
Translate arrays form userfield_values to the format expected by the table class.
stAn Note -> when a field of [0] is deleted (or others), you cannot use count to itenerate the array
array | $titles | List of titles from the formdata |
array | $values | List of values from the formdata |
int | $virtuemart_userfield_id | ID of the userfield to relate |
VirtueMartModelUserfields::prepareFieldDataSave | ( | $field, | |
& | $data, | ||
$prefix = '' |
|||
) |
Prepare a user field for database update
VirtueMartModelUserfields::remove | ( | $fieldIds | ) |
Delete all record ids selected
VirtueMartModelUserfields::store | ( | & | $data | ) |
Bind the post data to the userfields table and save it
|
private |
Bind and write all value records
array | $_values | |
mixed | $_id | If a new record is being inserted, it contains the virtuemart_userfield_id, otherwise the value true |
|
static |
|
static |