protected function init($conf)
    {
        $this->conf = $conf;
        $this->pi_setPiVarDefaults();
        $this->pi_loadLL('EXT:tt_address/Resources/Private/Language/locallang_pi1.xlf');
        $this->pi_initPIflexForm();

        // flexform data
        $flexKeyMapping = [
            'sDEF.singleRecords' => 'singleRecords',
            'sDEF.groupSelection' => 'groupSelection',
            'sDEF.combination' => 'combination',
            'sDEF.sortBy' => 'sortBy',
            'sDEF.sortOrder' => 'sortOrder',
            'sDEF.pages' => 'pages',
            'sDEF.recursive' => 'recursive',
            'sDISPLAY.templateFile' => 'templateFile',
        ];
        $this->ffData = $this->getFlexFormConfig($flexKeyMapping);

        //set default combination to AND if no combination set
        $combination = 'AND';
        if (!empty($this->ffData['combination']) || !empty($this->conf['combination'])) {
            // 0 and '0' are considered empty, therefore anything else means 1/true => OR
            $combination = 'OR';
        }
        $this->conf['combination'] = $combination;

        // check sorting, priorize FlexForm configuration over TypoScript
        if ($this->ffData['sortBy'] && $this->ffData['sortBy'] !== 'default') {
            // sortBy from FlexForm overrides TypoScript configuration
            $this->conf['sortByColumn'] = $this->ffData['sortBy'];
        }

        // check sorting column for validity, use default column "name" if column is invalid or not set
        $this->conf['sortByColumn'] = $this->checkSorting($this->conf['sortByColumn']);

        //set sorting, set to ASC if not valid
        $sortOrder = $this->ffData['sortOrder'] ?: $this->conf['sortOrder'];
        $this->conf['sortOrder'] = strtoupper($sortOrder) === 'DESC' ? SORT_DESC : SORT_ASC;

        // overwrite TS pidList if set in flexform
        $pages = !empty($this->ffData['pages']) ? $this->ffData['pages'] :
            trim($this->cObj->stdWrap($this->conf['pidList'], $this->conf['pidList.']));
        $pages = $pages ?
            implode(GeneralUtility::intExplode(',', $pages), ',') :
            $this->getTypoScriptFrontendController()->id;

        $recursive = (int)($this->ffData['recursive'] ?: $this->conf['recursive']);

        $this->conf['pidList'] = $this->pi_getPidList($pages, $recursive);

        $this->conf['singleSelection'] = $this->ffData['singleRecords'] ?:
            $this->cObj->stdWrap($this->conf['singleSelection'], $this->conf['singleSelection.']);

        $this->conf['groupSelection'] = $this->ffData['groupSelection'] ?:
            $this->cObj->stdWrap($this->conf['groupSelection'], $this->conf['groupSelection.']);

        $this->conf['templateName'] = $this->getTemplateName();
    }