Adapt countries to add country code, create command to populate or update countries and translate countries to chill_main.available languages. Fix #317 and fix #316

The LoadCountries Data fixtures are also updated. Both Command and DataFixtures/ORM/LoadCountries use the same static function.

[ci skip]
This commit is contained in:
2014-11-16 22:18:12 +01:00
parent e9da6412cc
commit a9f4324513
4 changed files with 134 additions and 249 deletions

View File

@@ -17,7 +17,13 @@ class Country
/**
* @var string
*/
private $label;
private $name;
/**
*
* @var string
*/
private $countryCode;
/**
@@ -31,29 +37,51 @@ class Country
}
/**
* Set label
* Set name
*
* @param string $label
* @param string $name
* @return Country
*/
public function setLabel($label)
public function setName($name)
{
$this->label = $label;
$this->name = $name;
return $this;
}
/**
* Get label
* Get name
*
* @return string
*/
public function getLabel()
public function getName()
{
return $this->label;
return $this->name;
}
public function __toString() {
return $this->getLabel();
return $this->getName();
}
/**
*
* @return the string
*/
public function getCountryCode()
{
return $this->countryCode;
}
/**
*
* @param string $countryCode
*/
public function setCountryCode($countryCode)
{
$this->countryCode = $countryCode;
return $this;
}
}