[BrutBridge] Create custom feed name for each category and edition (#1164)

This commit is contained in:
Joseph 2019-06-13 17:13:02 +00:00 committed by LogMANOriginal
parent de53120843
commit 2559dbbf49
1 changed files with 15 additions and 0 deletions

View File

@ -92,6 +92,21 @@ class BrutBridge extends BridgeAbstract {
return parent::getURI();
}
public function getName() {
if (!is_null($this->getInput('edition')) && !is_null($this->getInput('category'))) {
$parameters = $this->getParameters();
$editionValues = array_flip($parameters[0]['edition']['values']);
$categoryValues = array_flip($parameters[0]['category']['values']);
return $categoryValues[$this->getInput('category')] . ' - ' .
$editionValues[$this->getInput('edition')] . ' - Brut.';
}
return parent::getName();
}
private function processDate($description) {
if ($this->getInput('edition') === 'uk') {