public function getCurrentDateTime() { return $this->currentDateTime; }
/** * Tells if this node is "visible". * * For this the "hidden" flag and the "hiddenBeforeDateTime" and "hiddenAfterDateTime" dates are * taken into account. * * @return boolean * @api */ public function isVisible() { if ($this->nodeData->isVisible() === false) { return false; } $currentDateTime = $this->context->getCurrentDateTime(); if ($this->getHiddenBeforeDateTime() !== null && $this->getHiddenBeforeDateTime() > $currentDateTime) { return false; } if ($this->getHiddenAfterDateTime() !== null && $this->getHiddenAfterDateTime() < $currentDateTime) { return false; } return true; }