src/Form/Element/Select.php
public function setDependOn($selector, $url)
    {
        return $this->addAttribute('data-parent-url', $url)
                    ->addAttribute('data-parent-selector',  $selector)
                    ->addAttribute('data-populate', function(Element $element){
                        return $element->getValue();
                    })
                    ->addClass('select-remote');
    }
public function setDependOn($selector, $url)
    {
        return $this->addAttribute('data-parent-url', $url)
                    ->addAttribute('data-parent-selector',  $selector)
                    ->addAttribute('data-populate', function(Element $element){
                        return $element->getValue();
                    })
                    ->addClass('select-remote');
    }
public function setDependOn ( $ selector , $ url ) { return $ this -> addAttribute ( 'data-parent-url' , $ url ) -> addAttribute ( 'data-parent-selector' , $ selector ) -> addAttribute ( 'data-populate' , function ( Element $ element ) { return $ element -> getValue ( ) ; } ) -> addClass ( 'select-remote' ) ; }
Set Options from parent selection

@param $selector
@param $url
@return $this
Set Options from parent selection