}
}
- protected $_repeats = array();
-
- function getRepeats()
- {
- if (isset($this->_repeats[$this->id])) {
- return $this->_repeats[$this->id];
- }
- $repeatMap = Notice::listGet('repeat_of', array($this->id));
- $this->_setRepeats($repeatMap[$this->id]);
- return $this->_repeats[$this->id];
- }
-
- function _setRepeats(array $repeats)
- {
- $this->_repeats[$this->id] = $repeats;
- }
-
- static function fillRepeats(array &$notices)
- {
- $ids = self::_idsOf($notices);
- $repeatMap = Notice::listGet('repeat_of', $ids);
- foreach ($notices as $notice) {
- $repeats = $repeatMap[$notice->id];
- $notice->_setRepeats($repeats);
- }
- }
-
+ /**
+ * Checks whether this notice is in "private scope" (non-public notice)
+ *
+ * @return $isPrivate Whether this notice is private
+ */
+ public function isPrivateScope ()
+ {
+ return ($this->scope != Notice::SITE_SCOPE &&
+ $this->scope != Notice::PUBLIC_SCOPE);
+ }
}