protected function getEditionResponse(Entity $entity = null)
    {
        // Create a new HTML response.
        $response = $this->getHtmlResponse();
        // Indicate where is the template.
        $response->setTemplateId(sprintf(
            '%s/edit',
            $this->getCollectionName()
        ));
        // If there is an entity ID, load that entity in the response as well.
        if ($entity) {
            $response->setData(
                $this->getItemName(),
                $entity->getFieldsData()
            );
        }

        return $response;
    }