src/View/ActionHandler/EditHandler.php
public function process(EnvironmentInterface $environment)
    {
        $definition      = $environment->getDataDefinition();
        $basicDefinition = $definition->getBasicDefinition();

        if (!$basicDefinition->isEditable()) {
            throw new NotEditableException('DataContainer ' . $definition->getName() . ' is not editable');
        }
        // We only support flat tables, sorry.
        if (BasicDefinitionInterface::MODE_FLAT !== $basicDefinition->getMode()) {
            return false;
        }
        $modelId = ModelId::fromSerialized($environment->getInputProvider()->getParameter('id'));

        $dataProvider = $environment->getDataProvider();
        $model        = $dataProvider->fetch($dataProvider->getEmptyConfig()->setId($modelId->getId()));
        $clone        = $dataProvider->getEmptyModel();

        if (null === $model) {
            throw new PageNotFoundException('Model not found: ' . $modelId->getSerialized());
        }

        return (new EditMask($environment, $model, $clone, null, null))->execute();
    }
public function process(EnvironmentInterface $environment)
    {
        $definition      = $environment->getDataDefinition();
        $basicDefinition = $definition->getBasicDefinition();

        if (!$basicDefinition->isEditable()) {
            throw new NotEditableException('DataContainer ' . $definition->getName() . ' is not editable');
        }
        // We only support flat tables, sorry.
        if (BasicDefinitionInterface::MODE_FLAT !== $basicDefinition->getMode()) {
            return false;
        }
        $modelId = ModelId::fromSerialized($environment->getInputProvider()->getParameter('id'));

        $dataProvider = $environment->getDataProvider();
        $model        = $dataProvider->fetch($dataProvider->getEmptyConfig()->setId($modelId->getId()));
        $clone        = $dataProvider->getEmptyModel();

        if (null === $model) {
            throw new PageNotFoundException('Model not found: ' . $modelId->getSerialized());
        }

        return (new EditMask($environment, $model, $clone, null, null))->execute();
    }
Handle the action.

@param EnvironmentInterface $environment The environment.

@return string|bool

@throws PageNotFoundException If item to edit was not found.
@throws NotEditableException  When the definition is not editable.