public function saveState(array &$params, $reflection = null) { parent::saveState($params, $reflection); if ($this->dir !== null) { $params['dirId'] = $this->dir->getId(); } if ($this->file !== null) { $params['fileId'] = $this->file->getId(); } }
/** * @internal */ public function generatePath() { if (!$this->isAllowedToWrite()) { throw new PermissionDeniedException(); } $old = $this->path; if ($this->parent && $this->parent instanceof \Doctrine\ORM\Proxy\Proxy) { $this->parent->__load(); } $this->path = ($this->parent ? $this->parent->path . '/' : '') . Strings::webalize($this->name, '.', false); if ($this->path == $old) { return; } if ($this->id) { if (!$this->oldPath && $old != $this->path) { $this->oldPath = $old; } elseif ($this->oldPath && $this->oldPath == $this->path) { $this->oldPath = null; } } }