/** * Specify whether or not this item is locked / locked to category based on project new issues lock type * * @param Project $project */ public function setLockedFromProject(Project $project) { switch ($project->getIssuesLockType()) { case Project::ISSUES_LOCK_TYPE_PUBLIC_CATEGORY: $this->setLocked(false); $this->setLockedCategory(true); break; case Project::ISSUES_LOCK_TYPE_PUBLIC: $this->setLocked(false); $this->setLockedCategory(false); break; case Project::ISSUES_LOCK_TYPE_RESTRICTED: $this->setLocked(true); $this->setLockedCategory(false); break; } }