private static function checkRecursion($component, $sections)
    {
        $sectparent = null;

        foreach ($sections as $key => $sect) {

            if (in_array($component, $sect->getSectionParts()->getArrayCopy())) {

                $sectparent = $sect;
            }

            if ($sect->getIdentifier() == $component->getIdentifier()) {
                break;
            }
        }

        return $sectparent;
    }