Skip to content

Latest commit

 

History

History
1365 lines (697 loc) · 32.1 KB

class.CountyCore.md

File metadata and controls

1365 lines (697 loc) · 32.1 KB

Class CountyCore

  • Class name: CountyCore
  • Parent class: ObjectModel
  • Warning: this class is deprecated. This means that this class will likely be removed in a future version.
  • Source: classes/County.php line 32

Contents

Constants

Properties

Methods

Constants

USE_BOTH_TAX

const USE_BOTH_TAX = 0
  • Warning: this constant is deprecated. This means that this constant will likely be removed in a future version.
  • Source: classes/County.php line 49.

USE_COUNTY_TAX

const USE_COUNTY_TAX = 1
  • Warning: this constant is deprecated. This means that this constant will likely be removed in a future version.
  • Source: classes/County.php line 50.

USE_STATE_TAX

const USE_STATE_TAX = 2
  • Warning: this constant is deprecated. This means that this constant will likely be removed in a future version.
  • Source: classes/County.php line 51.

Properties

$_cache_county_zipcode

private mixed $_cache_county_zipcode = array()
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • This property is static.
  • Source: classes/County.php line 47.

$_cache_get_counties

private mixed $_cache_get_counties = array()
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • This property is static.
  • Source: classes/County.php line 46.

$active

public mixed $active
  • Visibility: public
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 37.

$fieldsRequired

protected mixed $fieldsRequired = array('name')
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 39.

$fieldsSize

protected mixed $fieldsSize = array('name' => 64)
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 40.

$fieldsValidate

protected mixed $fieldsValidate = array('name' => 'isGenericName', 'id_state' => 'isUnsignedId', 'active' => 'isBool')
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 41.

$id

public mixed $id
  • Visibility: public
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 34.

$id_state

public mixed $id_state
  • Visibility: public
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 36.

$identifier

protected mixed $identifier = 'id_county'
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 44.

$name

public mixed $name
  • Visibility: public
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 35.

$table

protected mixed $table = 'county'
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 43.

$webserviceParameters

protected mixed $webserviceParameters = array('fields' => array('id_state' => array('xlink_resource' => 'states')))
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.
  • Source: classes/County.php line 53.

$_cache

protected mixed $_cache = array()

$fieldsRequiredDatabase

protected \fieldsRequiredDatabase $fieldsRequiredDatabase = null

$fieldsRequiredLang

protected array $fieldsRequiredLang = array()

$fieldsSizeLang

protected array $fieldsSizeLang = array()

$fieldsValidateLang

protected array $fieldsValidateLang = array()

$id_lang

protected integer $id_lang = null

$id_shop

protected mixed $id_shop = null

$image_dir

protected string $image_dir = null

$image_format

protected string $image_format = 'jpg'

$langMultiShop

protected mixed $langMultiShop = false

$tables

protected array $tables = array()

Methods

__construct

mixed ObjectModelCore::__construct(integer $id, integer $id_lang, $id_shop)

Build object

Arguments

  • $id integer - Existing object id in order to load object (optional)
  • $id_lang integer - Required if object is multilingual (optional)
  • $id_shop mixed

add

mixed ObjectModelCore::add($autodate, $nullValues)

Add current object to database

return boolean Insertion result

Arguments

  • $autodate mixed
  • $nullValues mixed

addFieldsRequiredDatabase

mixed ObjectModelCore::addFieldsRequiredDatabase($fields)

Arguments

  • $fields mixed

addZipCodes

mixed CountyCore::addZipCodes($zip_codes)
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 94

Arguments

  • $zip_codes mixed

associateTo

boolean ObjectModelCore::associateTo(integer|array $id_shops, string $type)

This function associate an item to its context

Arguments

  • $id_shops integer|array
  • $type string

breakDownZipCode

mixed CountyCore::breakDownZipCode($zip_codes)
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 112

Arguments

  • $zip_codes mixed

clearCache

mixed ObjectModelCore::clearCache($all)

Arguments

  • $all mixed

delete

mixed CountyCore::delete()
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 68

deleteImage

boolean ObjectModelCore::deleteImage()

Delete images associated with the object

deleteSelection

mixed ObjectModelCore::deleteSelection($selection)

Delete several objects from database

return boolean Deletion result

Arguments

  • $selection mixed

deleteZipCodeByIdCounty

mixed CountyCore::deleteZipCodeByIdCounty($id_county)
  • Visibility: public
  • This method is static.
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 148

Arguments

  • $id_county mixed

displayFieldName

mixed ObjectModelCore::displayFieldName($field, $className, $htmlentities, \Context $context)

Arguments

  • $field mixed
  • $className mixed
  • $htmlentities mixed
  • $context Context

duplicateShops

mixed ObjectModelCore::duplicateShops($id)

Arguments

  • $id mixed

existsInDatabase

boolean ObjectModelCore::existsInDatabase($id_entity, $table)

Specify if an ObjectModel is already in database

Arguments

  • $id_entity mixed - entity id
  • $table mixed

getCounties

mixed CountyCore::getCounties($id_state)
  • Visibility: public
  • This method is static.
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 76

Arguments

  • $id_state mixed

getFields

mixed CountyCore::getFields()
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 59

getFieldsRequiredDatabase

mixed ObjectModelCore::getFieldsRequiredDatabase($all)

Arguments

  • $all mixed

getFieldsValidateLang

array ObjectModelCore::getFieldsValidateLang()

Get list of fields related to language to validate

getIdCountyByNameAndIdState

mixed CountyCore::getIdCountyByNameAndIdState($name, $id_state)
  • Visibility: public
  • This method is static.
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 157

Arguments

  • $name mixed
  • $id_state mixed

getIdCountyByZipCode

mixed CountyCore::getIdCountyByZipCode($id_state, $zip_code)
  • Visibility: public
  • This method is static.
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 121

Arguments

  • $id_state mixed
  • $zip_code mixed

getIdentifier

string ObjectModelCore::getIdentifier()

Get object identifier name

getTranslationsFields

mixed ObjectModelCore::getTranslationsFields(array $fieldsArray)

Prepare multilingual fields for database insertion

Arguments

  • $fieldsArray array - Multilingual fields to prepare return array Prepared fields for database insertion

getValidationRules

array ObjectModelCore::getValidationRules(string $className)

Returns object validation rules (fields validity)

Arguments

  • $className string - Child class name for static use (optional)

getWebserviceObjectList

mixed ObjectModelCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)

Arguments

  • $sql_join mixed
  • $sql_filter mixed
  • $sql_sort mixed
  • $sql_limit mixed

getWebserviceParameters

mixed ObjectModelCore::getWebserviceParameters($wsParamsAttributeName)

Arguments

  • $wsParamsAttributeName mixed

getZipCodes

mixed CountyCore::getZipCodes()
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 85

hydrate

mixed ObjectModelCore::hydrate(array $data, integer $id_lang)

Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.)

Arguments

  • $data array
  • $id_lang integer

hydrateCollection

array ObjectModelCore::hydrateCollection(string $class, array $datas, integer $id_lang)

Fill (hydrate) a list of objects in order to get a collection of these objects

Arguments

  • $class string - Class of objects to hydrate
  • $datas array - List of data (multi-dimensional array)
  • $id_lang integer

isAssociatedToGroupShop

boolean ObjectModelCore::isAssociatedToGroupShop(integer $id_group_shop)

Check if current object is associated to a group shop

Arguments

  • $id_group_shop integer

isAssociatedToShop

boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)

Check if current object is associated to a shop

Arguments

  • $id_shop integer

isCurrentlyUsed

boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)

This method is allow to know if a entity is currently used

Arguments

  • $table string - name of table linked to entity
  • $has_active_column boolean - true if the table has an active column

isLangMultishop

mixed ObjectModelCore::isLangMultishop()

isZipCodePresent

mixed CountyCore::isZipCodePresent($zip_code)
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 139

Arguments

  • $zip_code mixed

isZipCodeRangePresent

mixed CountyCore::isZipCodeRangePresent($zip_codes)
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 130

Arguments

  • $zip_codes mixed

makeTranslationFields

mixed ObjectModelCore::makeTranslationFields($fields, $fieldsArray, $id_language)

Arguments

  • $fields mixed
  • $fieldsArray mixed
  • $id_language mixed

removeZipCodes

mixed CountyCore::removeZipCodes($zip_codes)
  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.
  • Source: classes/County.php line 103

Arguments

  • $zip_codes mixed

save

mixed ObjectModelCore::save($nullValues, $autodate)

Save current object to database (add or update)

return boolean Insertion result

Arguments

  • $nullValues mixed
  • $autodate mixed

toggleStatus

mixed ObjectModelCore::toggleStatus()

Toggle object status in database

return boolean Update result

update

boolean ObjectModelCore::update($nullValues)

Update current object to database

Arguments

  • $nullValues mixed

validateControler

mixed ObjectModelCore::validateControler($htmlentities)

TODO: refactor rename all calls to this to validateController

Arguments

  • $htmlentities mixed

validateController

mixed ObjectModelCore::validateController($htmlentities)

Arguments

  • $htmlentities mixed

validateFields

mixed ObjectModelCore::validateFields($die, $errorReturn)

Check for fields validity before database interaction

Arguments

  • $die mixed
  • $errorReturn mixed

validateFieldsLang

mixed ObjectModelCore::validateFieldsLang($die, $errorReturn)

Check for multilingual fields validity before database interaction

Arguments

  • $die mixed
  • $errorReturn mixed