If you want to override the template then you can use plugin
Create after Plugin getTemplate method on the class Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit
and use your template file as the alternative of default.phtml
Create di.xml
at app/code/{Vendorname}/{Modulename}/etc/frontend/
for define the plugin class:
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit">
<plugin name="change_template_for_edit" type="{Vendorname}\{Modulename}\Plugin\Cart\EditPlugin" sortOrder="1" disabled="false" />
</type>
</config>
And finally, add the plugin class EditPlugin.php
at app/code/{Vendorname}/{Modulename}/Plugin/Cart
<?php
namespace {Vendorname}\{Modulename}\Plugin\Cart;
class EditPlugin
{
public function afterGetTemplate(
\Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit $subject,
$result
) { // use Own module edit.phtml
return '{Vendorname}_{Modulename}::cart/item/renderer/actions/edit.phtml';
}
}
Create a template file which is replicate of default edit.phtml
at app/code/{Vendorname}/{Modulename}//view/frontend/templates/cart/item/renderer/actions/edit.phtml