1. Go to this page and download the library: Download techad/edc-popover-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Techad\EdcPopoverBundle\Service\EdcHelp;
class IndexController extends AbstractController
{
/**
* @var EdcHelp
*/
private $edcHelp;
public function __construct(EdcHelp $edcHelp)
{
$this->edcHelp = $edcHelp;
}
/**
* @Route("/")
*/
public function index()
{
/* Get the contextual documentation for the main key: 'fr.techad.edc', sub key: 'documentation_type' and in french: 'fr'*/
$contextHelp = $this->edcHelp->getContextHelp('fr.techad.edc', 'documentation_type', 'fr');
return $this->render('index.html.twig', [
'contextHelp' => $contextHelp,
'data1' => 'Your data',
'label' => 'Your label...'
]);
}
}
{% import "@EdcPopover/popover/edc-popover.html.twig" as popover %}
{% import "@EdcPopover/popover/edc-popover.html.twig" as popover %}
twig
<div>
My functionality {{ popover.edc_help(contextHelp) }}
</div>
twig
<div>
My functionality {{ popover.edc_help_html(contextHelp) }}
</div>
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.