public function subControllerElement(array $url, array $data = [], array $options = []): string
    {
        $options = Hash::merge([
            'htmlElement' => 'div'
        ], $options);

        $name = '../' . $url['controller'] . '/' . Inflector::underscore($url['action']);
        $markup = '<' . $options['htmlElement'] . ' class="controller subcontroller ';
        $markup .= Inflector::underscore($url['controller']) . '-' . Inflector::underscore($url['action']);
        $markup .= '" data-controller="' . $url['controller'] . '" data-action="' . $url['action'] . '" ';
        $markup .= $this->getInstanceIdDataAttribute() . '>';
        $markup .= $this->_View->element($name, $data, $options);
        $markup .= '</' . $options['htmlElement'] . '>';

        return $markup;
    }
public function subControllerElement(array $url, array $data = [], array $options = []): string
    {
        $options = Hash::merge([
            'htmlElement' => 'div'
        ], $options);

        $name = '../' . $url['controller'] . '/' . Inflector::underscore($url['action']);
        $markup = '<' . $options['htmlElement'] . ' class="controller subcontroller ';
        $markup .= Inflector::underscore($url['controller']) . '-' . Inflector::underscore($url['action']);
        $markup .= '" data-controller="' . $url['controller'] . '" data-action="' . $url['action'] . '" ';
        $markup .= $this->getInstanceIdDataAttribute() . '>';
        $markup .= $this->_View->element($name, $data, $options);
        $markup .= '</' . $options['htmlElement'] . '>';

        return $markup;
    }
public function subControllerElement ( array $ url , array $ data = [ ] , array $ options = [ ] ) : string { $ options = Hash :: merge ( [ 'htmlElement' => 'div' ] , $ options ) ; $ name = '../' . $ url [ 'controller' ] . '/' . Inflector :: underscore ( $ url [ 'action' ] ) ; $ markup = '<' . $ options [ 'htmlElement' ] . ' class="controller subcontroller ' ; $ markup .= Inflector :: underscore ( $ url [ 'controller' ] ) . '-' . Inflector :: underscore ( $ url [ 'action' ] ) ; $ markup .= '" data-controller="' . $ url [ 'controller' ] . '" data-action="' . $ url [ 'action' ] . '" ' ; $ markup .= $ this -> getInstanceIdDataAttribute ( ) . '>' ; $ markup .= $ this -> _View -> element ( $ name , $ data , $ options ) ; $ markup .= '</' . $ options [ 'htmlElement' ] . '>' ; return $ markup ; }
Renders a subcontroller element which gets an js controller instance assigned

@param  array  $url     url array
@param  array  $data    data array
@param  array  $options options array
@return string
Renders a subcontroller element which gets an js controller instance assigned