/** * Gets the state of the entry * @return null */ public function getEntryState() { $entryState = parent::getEntryState(); if ($entryState !== self::STATE_CLEAN || isset($this->checkEntryState)) { return $entryState; } $this->checkEntryState = true; $entryState = null; if (!$entryState && $this->folder && $this->folder->getEntryState() !== self::STATE_CLEAN) { $entryState = self::STATE_DIRTY; } if (!$entryState && $this->styles) { foreach ($this->styles as $value) { if ($value->getEntryState() !== self::STATE_CLEAN) { $entryState = self::STATE_DIRTY; break; } } } if (!$entryState && $this->owner && $this->owner->getEntryState() !== self::STATE_CLEAN) { $entryState = self::STATE_DIRTY; } if (!$entryState) { $entryState = self::STATE_CLEAN; } unset($this->checkEntryState); return $entryState; }
/** * Gets the state of the entry * @return null */ public function getEntryState() { $entryState = parent::getEntryState(); if ($entryState !== self::STATE_CLEAN || isset($this->checkEntryState)) { return $entryState; } $this->checkEntryState = true; $entryState = null; if (!$entryState && $this->user && $this->user->getEntryState() !== self::STATE_CLEAN) { $entryState = self::STATE_DIRTY; } if (!$entryState) { $entryState = self::STATE_CLEAN; } unset($this->checkEntryState); return $entryState; }