Added name duplication check when creating a variable
This commit is contained in:
@@ -29,8 +29,6 @@ class ConfigChangeEvent extends ConfigCreateEvent
|
||||
{
|
||||
protected $config_id;
|
||||
|
||||
protected $hidden;
|
||||
protected $secured;
|
||||
protected $description;
|
||||
protected $chapo;
|
||||
protected $postscriptum;
|
||||
@@ -52,30 +50,6 @@ class ConfigChangeEvent extends ConfigCreateEvent
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHidden()
|
||||
{
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
public function setHidden($hidden)
|
||||
{
|
||||
$this->hidden = $hidden;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSecured()
|
||||
{
|
||||
return $this->secured;
|
||||
}
|
||||
|
||||
public function setSecured($secured)
|
||||
{
|
||||
$this->secured = $secured;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
|
||||
@@ -30,6 +30,8 @@ class ConfigCreateEvent extends ConfigEvent
|
||||
protected $value;
|
||||
protected $locale;
|
||||
protected $title;
|
||||
protected $hidden;
|
||||
protected $secured;
|
||||
|
||||
// Use event_name to prevent conflict with Event::name property.
|
||||
public function getEventName()
|
||||
@@ -79,4 +81,28 @@ class ConfigCreateEvent extends ConfigEvent
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHidden()
|
||||
{
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
public function setHidden($hidden)
|
||||
{
|
||||
$this->hidden = $hidden;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSecured()
|
||||
{
|
||||
return $this->secured;
|
||||
}
|
||||
|
||||
public function setSecured($secured)
|
||||
{
|
||||
$this->secured = $secured;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,22 @@ use Thelia\Model\Config;
|
||||
|
||||
class ConfigDeleteEvent extends ConfigEvent
|
||||
{
|
||||
protected $config_id;
|
||||
|
||||
public function __construct($config_id)
|
||||
{
|
||||
$this->setConfigId($config_id);
|
||||
}
|
||||
|
||||
public function getConfigId()
|
||||
{
|
||||
return $this->config_id;
|
||||
}
|
||||
|
||||
public function setConfigId($config_id)
|
||||
{
|
||||
$this->config_id = $config_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user