status()) === 'active') { return; } if (strtolower($context->status()) === 'draft' && $allowDraftForAdmin && $isAdmin) { return; } throw new SchoolYearWriteConflictException('The selected school year is read-only.'); } }