public function submit($postContent)
    {
        $linkData = [];
        if (!empty($postContent['internal'])) {
            $linkData['link'] = 'internal://' . $postContent['internal'];
        } elseif (!empty($postContent['custom'])) {
            $linkData['link'] = $postContent['custom'];
        } else {
            $linkData['link'] = '';
        }
        $linkData['target'] = !empty($postContent['target']) ? $postContent['target'] : '';
        return $this->save(empty($linkData['link']) ? '' : serialize($linkData));
    }
public function submit($postContent)
    {
        $linkData = [];
        if (!empty($postContent['internal'])) {
            $linkData['link'] = 'internal://' . $postContent['internal'];
        } elseif (!empty($postContent['custom'])) {
            $linkData['link'] = $postContent['custom'];
        } else {
            $linkData['link'] = '';
        }
        $linkData['target'] = !empty($postContent['target']) ? $postContent['target'] : '';
        return $this->save(empty($linkData['link']) ? '' : serialize($linkData));
    }
public function submit ( $ postContent ) { $ linkData = [ ] ; if ( ! empty ( $ postContent [ 'internal' ] ) ) { $ linkData [ 'link' ] = 'internal://' . $ postContent [ 'internal' ] ; } elseif ( ! empty ( $ postContent [ 'custom' ] ) ) { $ linkData [ 'link' ] = $ postContent [ 'custom' ] ; } else { $ linkData [ 'link' ] = '' ; } $ linkData [ 'target' ] = ! empty ( $ postContent [ 'target' ] ) ? $ postContent [ 'target' ] : '' ; return $ this -> save ( empty ( $ linkData [ 'link' ] ) ? '' : serialize ( $ linkData ) ) ; }
Update link settings
@param array $postContent
@return static
Update link settings