コード例 #1
0
ファイル: Node.php プロジェクト: radmiraal/TYPO3.TYPO3CR
 /**
  * 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;
 }
コード例 #2
0
 /**
  * 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;
 }