22 public const NETWORK_ID = ProtocolInfo::EDUCATION_SETTINGS_PACKET;
24 private string $codeBuilderDefaultUri;
25 private string $codeBuilderTitle;
26 private bool $canResizeCodeBuilder;
27 private bool $disableLegacyTitleBar;
28 private string $postProcessFilter;
29 private string $screenshotBorderResourcePath;
31 private ?
string $codeBuilderOverrideUri;
32 private bool $hasQuiz;
39 string $codeBuilderDefaultUri,
40 string $codeBuilderTitle,
41 bool $canResizeCodeBuilder,
42 bool $disableLegacyTitleBar,
43 string $postProcessFilter,
44 string $screenshotBorderResourcePath,
46 ?
string $codeBuilderOverrideUri,
51 $result->codeBuilderDefaultUri = $codeBuilderDefaultUri;
52 $result->codeBuilderTitle = $codeBuilderTitle;
53 $result->canResizeCodeBuilder = $canResizeCodeBuilder;
54 $result->disableLegacyTitleBar = $disableLegacyTitleBar;
55 $result->postProcessFilter = $postProcessFilter;
56 $result->screenshotBorderResourcePath = $screenshotBorderResourcePath;
57 $result->agentCapabilities = $agentCapabilities;
58 $result->codeBuilderOverrideUri = $codeBuilderOverrideUri;
59 $result->hasQuiz = $hasQuiz;
60 $result->linkSettings = $linkSettings;
64 public function getCodeBuilderDefaultUri() : string{
65 return $this->codeBuilderDefaultUri;
68 public function getCodeBuilderTitle() : string{
69 return $this->codeBuilderTitle;
72 public function canResizeCodeBuilder() : bool{
73 return $this->canResizeCodeBuilder;
76 public function disableLegacyTitleBar() : bool{ return $this->disableLegacyTitleBar; }
78 public function getPostProcessFilter() : string{ return $this->postProcessFilter; }
80 public function getScreenshotBorderResourcePath() : string{ return $this->screenshotBorderResourcePath; }
82 public function getAgentCapabilities() : ?EducationSettingsAgentCapabilities{ return $this->agentCapabilities; }
84 public function getCodeBuilderOverrideUri() : ?string{
85 return $this->codeBuilderOverrideUri;
88 public function getHasQuiz() : bool{
89 return $this->hasQuiz;
92 public function getLinkSettings() : ?EducationSettingsExternalLinkSettings{ return $this->linkSettings; }
95 $this->codeBuilderDefaultUri = $in->getString();
96 $this->codeBuilderTitle = $in->
getString();
97 $this->canResizeCodeBuilder = $in->
getBool();
98 $this->disableLegacyTitleBar = $in->
getBool();
99 $this->postProcessFilter = $in->
getString();
100 $this->screenshotBorderResourcePath = $in->
getString();
101 $this->agentCapabilities = $in->
readOptional(fn() => EducationSettingsAgentCapabilities::read($in));
103 $this->hasQuiz = $in->
getBool();
104 $this->linkSettings = $in->
readOptional(fn() => EducationSettingsExternalLinkSettings::read($in));
108 $out->putString($this->codeBuilderDefaultUri);
109 $out->putString($this->codeBuilderTitle);
110 $out->putBool($this->canResizeCodeBuilder);
111 $out->putBool($this->disableLegacyTitleBar);
112 $out->putString($this->postProcessFilter);
113 $out->putString($this->screenshotBorderResourcePath);
115 $out->
writeOptional($this->codeBuilderOverrideUri, $out->putString(...));
116 $out->putBool($this->hasQuiz);
121 return $handler->handleEducationSettings($this);
static create(string $codeBuilderDefaultUri, string $codeBuilderTitle, bool $canResizeCodeBuilder, bool $disableLegacyTitleBar, string $postProcessFilter, string $screenshotBorderResourcePath, ?EducationSettingsAgentCapabilities $agentCapabilities, ?string $codeBuilderOverrideUri, bool $hasQuiz, ?EducationSettingsExternalLinkSettings $linkSettings,)