| @@ -104,5 +104,21 @@ | ||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return $data; |
| 107 | 107 | } |
| 108 | + | |
| 109 | + /** | |
| 110 | + * Returns the minimal array representation suitable for the REST response. | |
| 111 | + * | |
| 112 | + * Only includes fields the frontend round-trips into the get_outline call. | |
| 113 | + * Excludes editor-only metadata (focus keyphrase, cornerstone, schema type) | |
| 114 | + * that must not cross the REST boundary. | |
| 115 | + * | |
| 116 | + * @return array<string, string> The minimal post payload. | |
| 117 | + */ | |
| 118 | + public function to_minimal_array(): array { | |
| 119 | + return [ | |
| 120 | + 'title' => $this->title, | |
| 121 | + 'description' => $this->description, | |
| 122 | + ]; | |
| 123 | + } | |
| 108 | 124 | } |