Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

DedupeRules Class Reference

Inheritance diagram for DedupeRules:
AccountDedupeRules ContactDedupeRules

Public Member Functions

 __construct (RedBeanModel $model)
 getDedupeViewClassName ()
 registerScriptForEditAndDetailsView (Element $element)
 searchForDuplicateModels ($attribute, $value)

Protected Member Functions

 getDedupeAttributesAndRelatedAttributesMappedArray ()
 getDedupeElements ()
 getDedupeAttributesAndSearchForDuplicateModelsCallbackMappedArray ()
 getInputIdForDedupe (Element $element)
 getAttributeForDedupe (Element $element)
 getRelatedAttributeForDedupe (Element $element)
 getElementNameByElement (Element $element)
 shouldCreateScriptForElement (Element $element)
 getCallbackToSearchForDuplicateModelsByAttribute ($attribute)

Protected Attributes

 $model

Detailed Description

Class DedupeRules Base class of dedupe rules that assist Extend this class to make a set of DedupeRules that is for a specific model.

Definition at line 42 of file DedupeRules.php.


Member Function Documentation

getDedupeAttributesAndRelatedAttributesMappedArray (  )  [protected]

This array should map the relation between the attribute and related attribute that should trigger the dedupe

Returns:
array

Reimplemented in AccountDedupeRules, and ContactDedupeRules.

Definition at line 55 of file DedupeRules.php.

getDedupeElements (  )  [protected]

This array contains a list of the Element names that will trigger the dedupe

Returns:
array

Reimplemented in AccountDedupeRules, and ContactDedupeRules.

Definition at line 64 of file DedupeRules.php.

getDedupeAttributesAndSearchForDuplicateModelsCallbackMappedArray (  )  [protected]

This array maps the relation between the attribute name and function callback for search for duplicate models

Returns:
array

Reimplemented in AccountDedupeRules, and ContactDedupeRules.

Definition at line 73 of file DedupeRules.php.

getDedupeViewClassName (  ) 

The ViewClassName used to display the results of the dedupe models list

Returns:
string

Definition at line 82 of file DedupeRules.php.

registerScriptForEditAndDetailsView ( Element element  ) 

Register the script that will make the ajax call to search for a dedupe and update the DedupeViewClassName with the content returned. It also display a clickable flash message with the number of results found

See also:
ZurmoModuleController::actionSearchForDuplicateModels
Parameters:
Element $element
Returns:
null

Definition at line 94 of file DedupeRules.php.

getInputIdForDedupe ( Element element  )  [protected]

Returns the input id that should be used to trigger the dedupe

Parameters:
Element $element
Returns:
null|string

Definition at line 170 of file DedupeRules.php.

getAttributeForDedupe ( Element element  )  [protected]

Returns the attribute name that should be used to trigger the dedupe

Parameters:
Element $element
Returns:
mixed
Exceptions:
NotSupportedException 

Definition at line 189 of file DedupeRules.php.

getRelatedAttributeForDedupe ( Element element  )  [protected]

Return the related attribute that should be used to trigger the dedupe

Parameters:
Element $element
Returns:
mixed

Definition at line 213 of file DedupeRules.php.

getElementNameByElement ( Element element  )  [protected]

Returns the name of the element

Parameters:
Element $element
Returns:
string

Definition at line 224 of file DedupeRules.php.

shouldCreateScriptForElement ( Element element  )  [protected]

Based on the Element the data from

See also:
DedupeRules::getDedupeAttributesAndRelatedAttributesMappedArray and
DedupeRules::getDedupeElements and from the model id, decided if the script for dedupe should be registered
Parameters:
Element $element
Returns:
bool

Definition at line 236 of file DedupeRules.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Jun 19 07:10:59 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8