Externalisation de la clé API Google dans la config du module PlanificationLivraison
This commit is contained in:
38
local/modules/PlanificationLivraison/Form/Configuration.php
Normal file
38
local/modules/PlanificationLivraison/Form/Configuration.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace PlanificationLivraison\Form;
|
||||
|
||||
use PlanificationLivraison\PlanificationLivraison;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
/**
|
||||
* Class Configuration
|
||||
* @package PlanificationLivraison\Form
|
||||
*/
|
||||
class Configuration extends BaseForm
|
||||
{
|
||||
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add(
|
||||
"google_api_key",
|
||||
"text",
|
||||
array(
|
||||
"label" => "GoogleMap API key",
|
||||
"label_attr" => [
|
||||
"for" => "google_api_key"
|
||||
],
|
||||
"required" => true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string the name of you form. This name must be unique
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return "planiflivraison_configuration";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user