src/Controller/DefaultController.php
protected function getPostObject(): array
    {
        $aConfig = $this->getConfig();
        $oModel  = static::getModel();
        $oInput  = Factory::service('Input');
        $oUri    = Factory::service('Uri');
        $aOut    = [];

        foreach ($aConfig['FIELDS'] as $oField) {
            if (in_array($oField->key, $aConfig['EDIT_IGNORE_FIELDS'])) {
                continue;
            }

            $aOut[$oField->key] = $oInput->post($oField->key);

            if ($oField->allow_null && empty($aOut[$oField->key])) {
                $aOut[$oField->key] = null;
            }

            //  Type casting
            switch ($oField->type) {
                case 'boolean':
                    $aOut[$oField->key] = (bool) $aOut[$oField->key];
                    break;
            }
        }

        if (classUses($oModel, Localised::class)) {
            $iExistingId = $oUri->segment(5);
            if ($oUri->segment(5)) {
                $aOut['id'] = $oUri->segment(5);
            }
        }

        return $aOut;
    }
protected function getPostObject(): array
    {
        $aConfig = $this->getConfig();
        $oModel  = static::getModel();
        $oInput  = Factory::service('Input');
        $oUri    = Factory::service('Uri');
        $aOut    = [];

        foreach ($aConfig['FIELDS'] as $oField) {
            if (in_array($oField->key, $aConfig['EDIT_IGNORE_FIELDS'])) {
                continue;
            }

            $aOut[$oField->key] = $oInput->post($oField->key);

            if ($oField->allow_null && empty($aOut[$oField->key])) {
                $aOut[$oField->key] = null;
            }

            //  Type casting
            switch ($oField->type) {
                case 'boolean':
                    $aOut[$oField->key] = (bool) $aOut[$oField->key];
                    break;
            }
        }

        if (classUses($oModel, Localised::class)) {
            $iExistingId = $oUri->segment(5);
            if ($oUri->segment(5)) {
                $aOut['id'] = $oUri->segment(5);
            }
        }

        return $aOut;
    }
Extract data from post variable

@return array