$mc
$mc :
Resolves smart-campaign rules array to one or more QB instances with correct constraints, and merges the results.
Rules array structure:
array(
'type' => 'AND',
'classes' => array
(
array
(
'type' => 'OR',
'class' => 'org_openpsa_contacts_person_dba',
'rules' => array
(
array
(
'property' => 'email',
'match' => 'LIKE',
'value' => '%@%'
),
array
(
'property' => 'handphone',
'match' => '<>',
'value' => ''
),
),
),
array
(
'type' => 'AND',
'class' => 'midgard_parameter',
'rules' => array
(
array
(
'property' => 'domain',
'match' => '=',
'value' => 'openpsa_test'
),
array
(
'property' => 'name',
'match' => '=',
'value' => 'param_match'
),
array
(
'property' => 'value',
'match' => '=',
'value' => 'bar'
),
),
),
),
),
NOTE: subgroups are processed before rules, subgroups must match class of parent group until midgard core has the new infinite JOINs system. The root level group array is named 'classes' because there should never be two groups on this level using the same class
get_mc() : \midcom_core_collector
build_property_map(\midcom_services_i18n_l10n $l10n)
\midcom_services_i18n_l10n | $l10n |
list_object_properties(\midcom_core_dbaobject $object, \midcom_services_i18n_l10n $l10n)
List object's properties for JS rule builder
PONDER: Should we support schema somehow (only for non-parameter keys), this would practically require manual parsing...
\midcom_core_dbaobject | $object | |
\midcom_services_i18n_l10n | $l10n |
add_misc_rule(array $rule, string $class, string $person_property)
Adds a passed rule for the passed class to the querybuilder
array | $rule | contains the rule |
string | $class | name of the class the rule will be added to |
string | $person_property | contains the name of the property of the passed class which links to the person |