public function SmartDateRule::getAllProperties in Smart Date 3.3.x
Same name and namespace in other branches
- 3.4.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::getAllProperties()
Return an array of all rule properties.
File
- modules/
smart_date_recur/ src/ Entity/ SmartDateRule.php, line 727
Class
- SmartDateRule
- Defines the Smart date rule entity.
Namespace
Drupal\smart_date_recur\EntityCode
public function getAllProperties() {
$array = $this
->getParametersArray();
$array['freq'] = $this
->get('freq')
->getString();
$end = $this
->get('limit')
->getString();
if (empty($end)) {
$array['limit'] = NULL;
$array['limit_val'] = NULL;
}
else {
list($limit, $limit_val) = explode('=', $end);
if ($limit == 'UNTIL') {
// Add midnight to specify the end of the last day.
$limit_val .= 'T235959';
}
$array['limit'] = $limit;
$array['limit_val'] = $limit_val;
}
return $array;
}