예제 #1
0
파일: UserEntry.php 프로젝트: brendt/ridme
 /**
  * @param \ride\application\orm\entry\UserPreferenceEntry $entry 
  * @return null
  */
 public function removeFromUserPreferences(AliasUserPreferenceEntry $entry)
 {
     $this->getUserPreferences();
     $status = false;
     foreach ($this->userPreferences as $userPreferencesIndex => $userPreferencesValue) {
         if ($userPreferencesValue === $entry || $userPreferencesValue->getId() === $entry->getId()) {
             unset($this->userPreferences[$userPreferencesIndex]);
             $status = true;
             break;
         }
     }
     if ($status && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
     return $status;
 }
예제 #2
0
 /**
  * @return string
  */
 public function getValue()
 {
     if (!isset($this->loadedFields['value'])) {
         $this->loadProperties();
     }
     return parent::getValue();
 }