request = $request; $this->context = $context; $this->schemaService = $schemaService; } /** * Get the property names of this entity according to its schema */ protected function getProps(): array { return $this->props ?? $this->schemaService->getFullProps($this->schema); } /** * Get the property names for a summary of this entity according to its schema */ protected function getSummaryProps(): array { return $this->summaryProps ?? $this->schemaService->getSummaryProps($this->schema); } /** * Get the URL to an object in the REST API */ protected function getApiUrl(string $route, $contextPath = PKPApplication::CONTEXT_ID_ALL): string { return $this->request->getDispatcher()->url( $this->request, PKPApplication::ROUTE_API, $contextPath, $route, ); } }