Exemplo n.º 1
0
 /**
  * @param \ride\application\orm\entry\SecuredPathEntry $securedPath 
  * @return null
  */
 public function setSecuredPath(AliasSecuredPathEntry $securedPath = NULL)
 {
     $isClean = false;
     if (!$this->securedPath && !$securedPath || $this->securedPath && $securedPath && $this->securedPath->getId() === $securedPath->getId()) {
         $isClean = true;
     }
     $this->securedPath = $securedPath;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Exemplo n.º 2
0
 /**
  * @param \ride\application\orm\entry\SecuredPathEntry $entry 
  * @return null
  */
 public function removeFromRolePaths(AliasSecuredPathEntry $entry)
 {
     $this->getRolePaths();
     $status = false;
     foreach ($this->rolePaths as $rolePathsIndex => $rolePathsValue) {
         if ($rolePathsValue === $entry || $rolePathsValue->getId() === $entry->getId()) {
             unset($this->rolePaths[$rolePathsIndex]);
             $status = true;
             break;
         }
     }
     if ($status && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
     return $status;
 }
Exemplo n.º 3
0
 /**
  * @param \ride\application\orm\entry\SecuredPathEntry $securedPath 
  * @return null
  */
 public function setSecuredPath(SecuredPathEntry $securedPath = NULL)
 {
     if (!isset($this->loadedFields['securedPath'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('securedPath', $this->loadedValues)) {
         $oldValue = $this->loadedValues['securedPath'];
     }
     if (!$oldValue && !$securedPath || $oldValue && $securedPath && $oldValue->getId() === $securedPath->getId()) {
         $this->securedPath = $securedPath;
         return;
     }
     return parent::setSecuredPath($securedPath);
 }
Exemplo n.º 4
0
 /**
  * @return integer
  */
 public function getWeight()
 {
     if (!isset($this->loadedFields['weight'])) {
         $this->loadProperties();
     }
     return parent::getWeight();
 }