protected function getLayout(View $viewConfiguration)
    {
        $layout = $this->arguments['layout'];

        if (false === is_string($layout)) {
            throw InvalidArgumentTypeException::invalidTypeNameArgumentFieldViewHelper($layout);
        }

        list($layoutName, $templateName) = GeneralUtility::trimExplode('.', $layout);

        if (empty($templateName)) {
            $templateName = 'default';
        }

        if (empty($layoutName)) {
            throw InvalidArgumentValueException::fieldViewHelperEmptyLayout();
        }

        if (false === $viewConfiguration->hasLayout($layoutName)) {
            throw EntryNotFoundException::fieldViewHelperLayoutNotFound($layout);
        }

        if (false === $viewConfiguration->getLayout($layoutName)->hasItem($templateName)) {
            throw EntryNotFoundException::fieldViewHelperLayoutItemNotFound($layout, $templateName);
        }

        return $viewConfiguration->getLayout($layoutName)->getItem($templateName);
    }