public function panelGroupOptions($dataContainer = null): array
    {
        $columns[] = 'tl_content.type = ?';
        $values[]  = 'bs_panel_group_start';

        if ($dataContainer) {
            $columns[] = 'tl_content.pid = ?';
            $columns[] = 'tl_content.ptable = ?';
            $columns[] = 'tl_content.sorting < ?';

            $values[] = $dataContainer->activeRecord->pid;
            $values[] = $dataContainer->activeRecord->ptable;
            $values[] = $dataContainer->activeRecord->sorting;
        }

        $collection = $this->repository->findBy($columns, $values, ['order' => 'tl_content.sorting ASC']);
        $options    = [];

        if ($collection) {
            foreach ($collection as $model) {
                $options[$model->id] = sprintf(
                    '%s [%s]',
                    $model->bs_panel_name,
                    $model->id
                );
            }
        }

        return $options;
    }
public function panelGroupOptions($dataContainer = null): array
    {
        $columns[] = 'tl_content.type = ?';
        $values[]  = 'bs_panel_group_start';

        if ($dataContainer) {
            $columns[] = 'tl_content.pid = ?';
            $columns[] = 'tl_content.ptable = ?';
            $columns[] = 'tl_content.sorting < ?';

            $values[] = $dataContainer->activeRecord->pid;
            $values[] = $dataContainer->activeRecord->ptable;
            $values[] = $dataContainer->activeRecord->sorting;
        }

        $collection = $this->repository->findBy($columns, $values, ['order' => 'tl_content.sorting ASC']);
        $options    = [];

        if ($collection) {
            foreach ($collection as $model) {
                $options[$model->id] = sprintf(
                    '%s [%s]',
                    $model->bs_panel_name,
                    $model->id
                );
            }
        }

        return $options;
    }
public function panelGroupOptions ( $ dataContainer = null ) : array { $ columns [ ] = 'tl_content.type = ?' ; $ values [ ] = 'bs_panel_group_start' ; if ( $ dataContainer ) { $ columns [ ] = 'tl_content.pid = ?' ; $ columns [ ] = 'tl_content.ptable = ?' ; $ columns [ ] = 'tl_content.sorting < ?' ; $ values [ ] = $ dataContainer -> activeRecord -> pid ; $ values [ ] = $ dataContainer -> activeRecord -> ptable ; $ values [ ] = $ dataContainer -> activeRecord -> sorting ; } $ collection = $ this -> repository -> findBy ( $ columns , $ values , [ 'order' => 'tl_content.sorting ASC' ] ) ; $ options = [ ] ; if ( $ collection ) { foreach ( $ collection as $ model ) { $ options [ $ model -> id ] = sprintf ( '%s [%s]' , $ model -> bs_panel_name , $ model -> id ) ; } } return $ options ; }
Get the panel group options.

@param DataContainer|null $dataContainer Data container driver.

@return array
Get the panel group options .