public function modelHistoryArea(EntityInterface $entity, array $options = []): string
    {
        $options = Hash::merge([
            'showCommentBox' => false,
            'showFilterBox' => false,
            'columnClass' => 'col-md-12',
            'includeAssociated' => false
        ], $options);

        $page = 1;
        $limit = TableRegistry::get($entity->source())->getEntriesLimit();

        $modelHistory = TableRegistry::get('ModelHistory.ModelHistory')->getModelHistory($entity->source(), $entity->id, $limit, $page, [], $options);

        $entries = TableRegistry::get('ModelHistory.ModelHistory')->getModelHistoryCount($entity->source(), $entity->id, [], $options);
        $showNextEntriesButton = $entries > 0 && $limit * $page < $entries;
        $showPrevEntriesButton = $page > 1;

        $contexts = [];
        if (method_exists($entity, 'getContexts')) {
            $contexts = $entity::getContexts();
        }

        return $this->_View->element('ModelHistory.model_history_area', [
            'modelHistory' => $modelHistory,
            'showNextEntriesButton' => $showNextEntriesButton,
            'showPrevEntriesButton' => $showPrevEntriesButton,
            'page' => $page,
            'model' => $entity->source(),
            'foreignKey' => $entity->id,
            'limit' => $limit,
            'searchableFields' => TableRegistry::get($entity->source())->getTranslatedFields(),
            'showCommentBox' => $options['showCommentBox'],
            'showFilterBox' => $options['showFilterBox'],
            'columnClass' => $options['columnClass'],
            'includeAssociated' => $options['includeAssociated'],
            'contexts' => $contexts
        ]);
    }