DirectorDatafieldForm: fix typo, translate

This commit is contained in:
Thomas Gelf 2023-08-19 13:08:10 +02:00
parent 71b311e258
commit 62f59d4c5a
1 changed files with 3 additions and 3 deletions

View File

@ -165,7 +165,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
$this->addElement('select', 'category_id', [
'label' => $this->translate('Data Field Category'),
'multiOptions' => $this->optionalEnum($this->enumCategpories()),
'multiOptions' => $this->optionalEnum($this->enumCategories()),
]);
$error = false;
@ -281,7 +281,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
protected function enumDataTypes()
{
$hooks = Hook::all('Director\\DataType');
$enum = array(null => '- please choose -');
$enum = [null => $this->translate('- please choose -')];
/** @var DataTypeHook $hook */
foreach ($hooks as $hook) {
$enum[get_class($hook)] = $hook->getName();
@ -290,7 +290,7 @@ class DirectorDatafieldForm extends DirectorObjectForm
return $enum;
}
protected function enumCategpories()
protected function enumCategories()
{
$db = $this->getDb()->getDbAdapter();
return $db->fetchPairs(