This commit is contained in:
@@ -132,6 +132,16 @@ abstract class BaseController extends Controller
|
||||
service('schoolYearWriteGuard')->assertWritable($context, $allowDraftForAdmin, $isAdmin);
|
||||
}
|
||||
|
||||
protected function assertSchoolYearNameWritable(
|
||||
string $schoolYear,
|
||||
bool $allowDraftForAdmin = false,
|
||||
bool $isAdmin = false
|
||||
): void {
|
||||
$context = service('schoolYearContext')->forYearName($schoolYear);
|
||||
|
||||
$this->assertSchoolYearWritable($context, $allowDraftForAdmin, $isAdmin);
|
||||
}
|
||||
|
||||
private function syncSchoolYearPropertyFromContext(): void
|
||||
{
|
||||
if (! property_exists($this, 'schoolYear')) {
|
||||
|
||||
Reference in New Issue
Block a user