NerdsAndCompany\Schematic\Services\Sections::resetCraftFieldsSectionModelCache PHP Method

resetCraftFieldsSectionModelCache() private method

Reset craft section model cache using reflection.
private resetCraftFieldsSectionModelCache ( Craft\SectionModel $section )
$section Craft\SectionModel
    private function resetCraftFieldsSectionModelCache(SectionModel $section)
    {
        $obj = $section;
        $refObject = new \ReflectionObject($obj);
        $refProperty = $refObject->getProperty('_entryTypes');
        $refProperty->setAccessible(true);
        $refProperty->setValue($obj, null);
    }