src/Admin/AbstractAdmin.php
protected function buildList()
    {
        if ($this->list) {
            return;
        }

        $this->list = $this->getListBuilder()->getBaseList();

        $mapper = new ListMapper($this->getListBuilder(), $this->list, $this);

        if (\count($this->getBatchActions()) > 0 && $this->hasRequest() && !$this->getRequest()->isXmlHttpRequest()) {
            $fieldDescription = $this->getModelManager()->getNewFieldDescriptionInstance(
                $this->getClass(),
                'batch',
                [
                    'label' => 'batch',
                    'code' => '_batch',
                    'sortable' => false,
                    'virtual_field' => true,
                ]
            );

            $fieldDescription->setAdmin($this);
            // NEXT_MAJOR: Remove this line and use commented line below it instead
            $fieldDescription->setTemplate($this->getTemplate('batch'));
            // $fieldDescription->setTemplate($this->getTemplateRegistry()->getTemplate('batch'));

            $mapper->add($fieldDescription, 'batch');
        }

        $this->configureListFields($mapper);

        foreach ($this->getExtensions() as $extension) {
            $extension->configureListFields($mapper);
        }

        if ($this->hasRequest() && $this->getRequest()->isXmlHttpRequest()) {
            $fieldDescription = $this->getModelManager()->getNewFieldDescriptionInstance(
                $this->getClass(),
                'select',
                [
                    'label' => false,
                    'code' => '_select',
                    'sortable' => false,
                    'virtual_field' => false,
                ]
            );

            $fieldDescription->setAdmin($this);
            // NEXT_MAJOR: Remove this line and use commented line below it instead
            $fieldDescription->setTemplate($this->getTemplate('select'));
            // $fieldDescription->setTemplate($this->getTemplateRegistry()->getTemplate('select'));

            $mapper->add($fieldDescription, 'select');
        }
    }
protected function buildList()
    {
        if ($this->list) {
            return;
        }

        $this->list = $this->getListBuilder()->getBaseList();

        $mapper = new ListMapper($this->getListBuilder(), $this->list, $this);

        if (\count($this->getBatchActions()) > 0 && $this->hasRequest() && !$this->getRequest()->isXmlHttpRequest()) {
            $fieldDescription = $this->getModelManager()->getNewFieldDescriptionInstance(
                $this->getClass(),
                'batch',
                [
                    'label' => 'batch',
                    'code' => '_batch',
                    'sortable' => false,
                    'virtual_field' => true,
                ]
            );

            $fieldDescription->setAdmin($this);
            // NEXT_MAJOR: Remove this line and use commented line below it instead
            $fieldDescription->setTemplate($this->getTemplate('batch'));
            // $fieldDescription->setTemplate($this->getTemplateRegistry()->getTemplate('batch'));

            $mapper->add($fieldDescription, 'batch');
        }

        $this->configureListFields($mapper);

        foreach ($this->getExtensions() as $extension) {
            $extension->configureListFields($mapper);
        }

        if ($this->hasRequest() && $this->getRequest()->isXmlHttpRequest()) {
            $fieldDescription = $this->getModelManager()->getNewFieldDescriptionInstance(
                $this->getClass(),
                'select',
                [
                    'label' => false,
                    'code' => '_select',
                    'sortable' => false,
                    'virtual_field' => false,
                ]
            );

            $fieldDescription->setAdmin($this);
            // NEXT_MAJOR: Remove this line and use commented line below it instead
            $fieldDescription->setTemplate($this->getTemplate('select'));
            // $fieldDescription->setTemplate($this->getTemplateRegistry()->getTemplate('select'));

            $mapper->add($fieldDescription, 'select');
        }
    }
protected function buildList ( ) { if ( $ this -> list ) { return ; } $ this -> list = $ this -> getListBuilder ( ) -> getBaseList ( ) ; $ mapper = new ListMapper ( $ this -> getListBuilder ( ) , $ this -> list , $ this ) ; if ( \ count ( $ this -> getBatchActions ( ) ) > 0 && $ this -> hasRequest ( ) && ! $ this -> getRequest ( ) -> isXmlHttpRequest ( ) ) { $ fieldDescription = $ this -> getModelManager ( ) -> getNewFieldDescriptionInstance ( $ this -> getClass ( ) , 'batch' , [ 'label' => 'batch' , 'code' => '_batch' , 'sortable' => false , 'virtual_field' => true , ] ) ; $ fieldDescription -> setAdmin ( $ this ) ; // NEXT_MAJOR: Remove this line and use commented line below it instead $ fieldDescription -> setTemplate ( $ this -> getTemplate ( 'batch' ) ) ; // $fieldDescription->setTemplate($this->getTemplateRegistry()->getTemplate('batch')); $ mapper -> add ( $ fieldDescription , 'batch' ) ; } $ this -> configureListFields ( $ mapper ) ; foreach ( $ this -> getExtensions ( ) as $ extension ) { $ extension -> configureListFields ( $ mapper ) ; } if ( $ this -> hasRequest ( ) && $ this -> getRequest ( ) -> isXmlHttpRequest ( ) ) { $ fieldDescription = $ this -> getModelManager ( ) -> getNewFieldDescriptionInstance ( $ this -> getClass ( ) , 'select' , [ 'label' => false , 'code' => '_select' , 'sortable' => false , 'virtual_field' => false , ] ) ; $ fieldDescription -> setAdmin ( $ this ) ; // NEXT_MAJOR: Remove this line and use commented line below it instead $ fieldDescription -> setTemplate ( $ this -> getTemplate ( 'select' ) ) ; // $fieldDescription->setTemplate($this->getTemplateRegistry()->getTemplate('select')); $ mapper -> add ( $ fieldDescription , 'select' ) ; } }
build the list FieldDescription array.
build the list FieldDescription array .