public function applyAccessFiltering($userID = null) { if (!$this->hasField('access')) { return $this; } $user = $this->container->platform->getUser($userID); $accessField = $this->getFieldAlias('access'); $this->setState($accessField, $user->getAuthorisedViewLevels()); return $this; }