public function addContentHere(Request $request)
    {
        $links = [];
        $handler = $this->getTypeHandler();
        foreach ($this->getTypeHandler()
                      ->getTypesAsHumanReadableList($handler->getContentTypes()) as $type => $name) {
            if (node_access('create', $type)) {
                $options = [
                    'query' => [
                        'destination' => $request->get('destination'),
                        'menu_name'   => $request->get('menu'),
                        'parent'      => $request->get('parent'),
                        'position'    => $request->get('position'),
                    ],
                ];
                $links[] = l($name, 'node/add/'.strtr($type, '_', '-'), $options);
            }
        }

        return [
            '#theme' => 'item_list',
            '#items' => $links,
        ];
    }
public function addContentHere(Request $request)
    {
        $links = [];
        $handler = $this->getTypeHandler();
        foreach ($this->getTypeHandler()
                      ->getTypesAsHumanReadableList($handler->getContentTypes()) as $type => $name) {
            if (node_access('create', $type)) {
                $options = [
                    'query' => [
                        'destination' => $request->get('destination'),
                        'menu_name'   => $request->get('menu'),
                        'parent'      => $request->get('parent'),
                        'position'    => $request->get('position'),
                    ],
                ];
                $links[] = l($name, 'node/add/'.strtr($type, '_', '-'), $options);
            }
        }

        return [
            '#theme' => 'item_list',
            '#items' => $links,
        ];
    }
public function addContentHere ( Request $ request ) { $ links = [ ] ; $ handler = $ this -> getTypeHandler ( ) ; foreach ( $ this -> getTypeHandler ( ) -> getTypesAsHumanReadableList ( $ handler -> getContentTypes ( ) ) as $ type => $ name ) { if ( node_access ( 'create' , $ type ) ) { $ options = [ 'query' => [ 'destination' => $ request -> get ( 'destination' ) , 'menu_name' => $ request -> get ( 'menu' ) , 'parent' => $ request -> get ( 'parent' ) , 'position' => $ request -> get ( 'position' ) , ] , ] ; $ links [ ] = l ( $ name , 'node/add/' . strtr ( $ type , '_' , '-' ) , $ options ) ; } } return [ '#theme' => 'item_list' , '#items' => $ links , ] ; }
Provides minidialog for creating content at a specific position

@param Request $request
@return array
Provides minidialog for creating content at a specific position