private function countRequiredSeparators($definition, $current): int
    {
        $definition = StringUtil::deserialize($definition, true);
        $count      = -1;

        foreach ($definition as $item) {
            if ($item['type'] !== 'dropdown') {
                $count++;
            }
        }

        $count -= $this->repository->countBy(
            [
                'tl_content.ptable=?',
                'tl_content.pid=?',
                '(tl_content.type = ? AND tl_content.bs_tab_parent = ?)',
            ],
            [$current->ptable, $current->pid, 'bs_tab_separator', $current->id],
            ['order' => 'tl_content.sorting ASC']
        );

        return $count;
    }
private function countRequiredSeparators($definition, $current): int
    {
        $definition = StringUtil::deserialize($definition, true);
        $count      = -1;

        foreach ($definition as $item) {
            if ($item['type'] !== 'dropdown') {
                $count++;
            }
        }

        $count -= $this->repository->countBy(
            [
                'tl_content.ptable=?',
                'tl_content.pid=?',
                '(tl_content.type = ? AND tl_content.bs_tab_parent = ?)',
            ],
            [$current->ptable, $current->pid, 'bs_tab_separator', $current->id],
            ['order' => 'tl_content.sorting ASC']
        );

        return $count;
    }
private function countRequiredSeparators ( $ definition , $ current ) : int { $ definition = StringUtil :: deserialize ( $ definition , true ) ; $ count = - 1 ; foreach ( $ definition as $ item ) { if ( $ item [ 'type' ] !== 'dropdown' ) { $ count ++ ; } } $ count -= $ this -> repository -> countBy ( [ 'tl_content.ptable=?' , 'tl_content.pid=?' , '(tl_content.type = ? AND tl_content.bs_tab_parent = ?)' , ] , [ $ current -> ptable , $ current -> pid , 'bs_tab_separator' , $ current -> id ] , [ 'order' => 'tl_content.sorting ASC' ] ) ; return $ count ; }
Count the required separator fields which should be created.

@param mixed        $definition The tab definitions.
@param ContentModel $current    The current content model.

@return int
Count the required separator fields which should be created .