All Data Structures Functions Variables Pages
Static Public Member Functions | Data Fields
MixedDateTypesSearchFormAttributeMappingRules Class Reference
Inheritance diagram for MixedDateTypesSearchFormAttributeMappingRules:
SearchFormAttributeMappingRules MixedDateTimeTypesSearchFormAttributeMappingRules MixedDateTypesTriggerForWorkflowFormAttributeMappingRules

Static Public Member Functions

static resolveValueDataIntoUsableValue ($value)
 
static resolveValueDataForBetweenIntoUsableFirstDateValue ($value)
 
static resolveValueDataForBetweenIntoUsableSecondDateValue ($value)
 
static getValidValueTypes ()
 
static getValueTypesAndLabels ()
 
static getTimeBasedValueTypesAndLabels ()
 
static getTimeOnlyValueTypesAndLabels ()
 
static getValueTypesRequiringFirstDateInput ()
 
static getValueTypesRequiringSecondDateInput ()
 
static getValueTypesWhereValueIsRequired ()
 
static getValueTypesWhereSecondValueIsRequired ()
 
static resolveAttributesAndRelations ($attributeName, &$attributeAndRelations, $value)
 
static calculateNewDateByDaysFromNow ($daysFromNow)
 
- Static Public Member Functions inherited from SearchFormAttributeMappingRules
static resolveValueDataIntoUsableValue ($value)
 
static resolveAttributesAndRelations ($attributeName, &$attributeAndRelations, $value)
 
static getIgnoredSavableMetadataRules ()
 

Data Fields

const TYPE_YESTERDAY = 'Yesterday'
 
const TYPE_TODAY = 'Today'
 
const TYPE_TOMORROW = 'Tomorrow'
 
const TYPE_BEFORE = 'Before'
 
const TYPE_AFTER = 'After'
 
const TYPE_ON = 'On'
 
const TYPE_BETWEEN = 'Between'
 
const TYPE_NEXT_7_DAYS = 'Next 7 Days'
 
const TYPE_LAST_7_DAYS = 'Last 7 Days'
 
const TYPE_LAST_30_DAYS = 'Last 30 Days'
 
const TYPE_THIS_MONTH = 'This Month'
 
const TYPE_LAST_MONTH = 'Last Month'
 
const TYPE_NEXT_MONTH = 'Next Month'
 
const TYPE_BEFORE_TODAY = 'Before Today'
 
const TYPE_IS_TIME_FOR = 'Is Time For'
 
const TYPE_IS_EMPTY = 'Is Empty'
 
const TYPE_IS_NOT_EMPTY = 'Is Not Empty'
 
const TYPE_WAS_ON = 'Was On'
 
const TYPE_BECOMES_ON = 'Becomes On'
 
const TYPE_CHANGES = 'Changes'
 
const TYPE_DOES_NOT_CHANGE = 'Does Not Change'
 

Detailed Description

Rule used in search form to define how the different date types are proceesed.

Definition at line 40 of file MixedDateTypesSearchFormAttributeMappingRules.php.

Member Function Documentation

static resolveValueDataIntoUsableValue (   $value)
static

In the event that the type is BEFORE or AFTER, and the firstDate value is not populated, it will be treated as null, and the search on this attribute will be ignored. At some point in the future the search form could have validation added, so that the empty firstDate combined with a type of BEFORE or AFTER would not get this far, but for now this is the easiest approach to ensuring a valid BEFORE or AFTER value.

Parameters
mixed$value
Returns
mixed

Definition at line 92 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static resolveValueDataForBetweenIntoUsableFirstDateValue (   $value)
static

When the value type is between, returns the firstDate value.

Parameters
unknown_type$value

Definition at line 140 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static resolveValueDataForBetweenIntoUsableSecondDateValue (   $value)
static

When the value type is between, returns the secondDate value.

Parameters
unknown_type$value

Definition at line 157 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getValidValueTypes ( )
static
Returns
array

Definition at line 173 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getValueTypesAndLabels ( )
static
Returns
array

Definition at line 202 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getTimeBasedValueTypesAndLabels ( )
static
Returns
array

Definition at line 224 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getTimeOnlyValueTypesAndLabels ( )
static
Returns
array

Definition at line 238 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getValueTypesRequiringFirstDateInput ( )
static
Returns
array

Definition at line 246 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getValueTypesRequiringSecondDateInput ( )
static
Returns
array

Definition at line 255 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getValueTypesWhereValueIsRequired ( )
static
Returns
array

Definition at line 263 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static getValueTypesWhereSecondValueIsRequired ( )
static
Returns
array

Definition at line 272 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static resolveAttributesAndRelations (   $attributeName,
$attributeAndRelations,
  $value 
)
static

The value['type'] deterimines how the attributeAndRelations is structured.

Parameters
string$attributeName
array$attributeAndRelations
mixed$value

Definition at line 283 of file MixedDateTypesSearchFormAttributeMappingRules.php.

static calculateNewDateByDaysFromNow (   $daysFromNow)
static

Given an integer representing a count of days from the present day, returns a DB formatted date stamp based on that calculation. This is a wrapper method for

See Also
DateTimeCalculatorUtil::calculateNewByDaysFromNow
Parameters
integer$daysFromNow

Definition at line 384 of file MixedDateTypesSearchFormAttributeMappingRules.php.


The documentation for this class was generated from the following file:
Generated on Mon Apr 6 2020 07:11:13