Check if formatter key exist

This commit is contained in:
Jean-Francois Monfort 2021-02-11 16:29:57 +01:00
parent a31e3ad6f6
commit c8507b4a13

View File

@ -567,13 +567,17 @@ class ExportManager
* get the formatter alias from the form export data * get the formatter alias from the form export data
* *
* @param array $data the data from the export form * @param array $data the data from the export form
* @string the formatter alias * @string the formatter alias|null
*/ */
public function getFormatterAlias(array $data) public function getFormatterAlias(array $data)
{ {
if (array_key_exists(ExportType::PICK_FORMATTER_KEY, $data)) {
return $data[ExportType::PICK_FORMATTER_KEY]['alias']; return $data[ExportType::PICK_FORMATTER_KEY]['alias'];
} }
return null;
}
/** /**
* Get the Center picked by the user for this export. The data are * Get the Center picked by the user for this export. The data are
* extracted from the PickCenterType data * extracted from the PickCenterType data