/**
* @param array $articleData
* @param ArticleDatetime $dateData
*/
public function setValues($dateData, $article, $fieldName, $articleType = null, $otherInfo = null)
{
if (is_null($articleType) && !$article instanceof Article) {
return false;
}
$this->articleId = $article instanceof Article ? $article->getId() : $article;
$this->articleType = is_null($articleType) ? $article->getType() : $articleType;
$this->fieldName = $fieldName;
$this->startDate = $dateData->getStartDate();
$this->endDate = $dateData->getEndDate();
$this->startTime = $dateData->getStartTime();
$this->endTime = $dateData->getEndTime();
$this->recurring = $dateData->getRecurring();
$this->eventComment = null;
if (is_array($otherInfo) && isset($otherInfo['eventComment'])) {
$this->eventComment = $otherInfo['eventComment'];
}
}