Added name duplication check when creating a variable

This commit is contained in:
franck
2013-09-02 01:25:11 +02:00
parent 928bf7b638
commit 1558f6af5f
10 changed files with 169 additions and 75 deletions

View File

@@ -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;

View File

@@ -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;
}
}

View File

@@ -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;
}
}