public function addDataProviderInput()
    {
        $input = (new Select(self::DATA_PARAM))
                ->setOptions(array(null => '---'));
        $dataProviderClasses = array();
        foreach ($this->di->get('config')->formFactory->dataProviders as $classname) {
            $provider = new $classname;
            if ($provider instanceof DataProviderInterface) {
                $dataProviderClasses[$classname] = $provider->getName();
            }
        }
        $input
                ->addOptions($dataProviderClasses)
                ->setLabel('Data provider');
        $this->add($input);
    }
public function addDataProviderInput()
    {
        $input = (new Select(self::DATA_PARAM))
                ->setOptions(array(null => '---'));
        $dataProviderClasses = array();
        foreach ($this->di->get('config')->formFactory->dataProviders as $classname) {
            $provider = new $classname;
            if ($provider instanceof DataProviderInterface) {
                $dataProviderClasses[$classname] = $provider->getName();
            }
        }
        $input
                ->addOptions($dataProviderClasses)
                ->setLabel('Data provider');
        $this->add($input);
    }
public function addDataProviderInput ( ) { $ input = ( new Select ( self :: DATA_PARAM ) ) -> setOptions ( array ( null => '---' ) ) ; $ dataProviderClasses = array ( ) ; foreach ( $ this -> di -> get ( 'config' ) -> formFactory -> dataProviders as $ classname ) { $ provider = new $ classname ; if ( $ provider instanceof DataProviderInterface ) { $ dataProviderClasses [ $ classname ] = $ provider -> getName ( ) ; } } $ input -> addOptions ( $ dataProviderClasses ) -> setLabel ( 'Data provider' ) ; $ this -> add ( $ input ) ; }
Adds selectable list of data providers.
Usable only for selectable input types.
Adds selectable list of data providers . Usable only for selectable input types .