public function FeedsDateTimeElement::merge in Feeds 8.2
Merge this field with another. Most stuff goes down when merging the two sub-dates.
See also
1 call to FeedsDateTimeElement::merge()
- FeedsDateTimeElement::buildDateField in lib/
Drupal/ feeds/ FeedsDateTimeElement.php - Build a entity's date field from our object.
File
- lib/
Drupal/ feeds/ FeedsDateTimeElement.php, line 50
Class
- FeedsDateTimeElement
- Defines a date element of a parsed result (including ranges, repeat).
Namespace
Drupal\feedsCode
public function merge(FeedsDateTimeElement $other) {
$this2 = clone $this;
if ($this->start && $other->start) {
$this2->start = $this->start
->merge($other->start);
}
elseif ($other->start) {
$this2->start = clone $other->start;
}
elseif ($this->start) {
$this2->start = clone $this->start;
}
if ($this->end && $other->end) {
$this2->end = $this->end
->merge($other->end);
}
elseif ($other->end) {
$this2->end = clone $other->end;
}
elseif ($this->end) {
$this2->end = clone $this->end;
}
return $this2;
}