public function recordBrowser()
    {
        $results = [];

        foreach ($this->app['config']->get('contenttypes') as $contenttype) {
            if ($contenttype['viewless']) {
                // Skip viewless ContentTypes
                continue;
            }

            $slug = $contenttype['slug'];
            $records = $this->getContent($slug, ['published' => true, 'hydrate' => false]);
            foreach ($records as $record) {
                $results[$slug][] = [
                    'title' => $record->getTitle(),
                    'id'    => $record->id,
                    'link'  => $record->link(),
                ];
            }
        }

        $context = ['results' => $results];

        return $this->render('@bolt/recordbrowser/recordbrowser.twig', ['context' => $context]);
    }
public function recordBrowser()
    {
        $results = [];

        foreach ($this->app['config']->get('contenttypes') as $contenttype) {
            if ($contenttype['viewless']) {
                // Skip viewless ContentTypes
                continue;
            }

            $slug = $contenttype['slug'];
            $records = $this->getContent($slug, ['published' => true, 'hydrate' => false]);
            foreach ($records as $record) {
                $results[$slug][] = [
                    'title' => $record->getTitle(),
                    'id'    => $record->id,
                    'link'  => $record->link(),
                ];
            }
        }

        $context = ['results' => $results];

        return $this->render('@bolt/recordbrowser/recordbrowser.twig', ['context' => $context]);
    }
public function recordBrowser ( ) { $ results = [ ] ; foreach ( $ this -> app [ 'config' ] -> get ( 'contenttypes' ) as $ contenttype ) { if ( $ contenttype [ 'viewless' ] ) { // Skip viewless ContentTypes continue ; } $ slug = $ contenttype [ 'slug' ] ; $ records = $ this -> getContent ( $ slug , [ 'published' => true , 'hydrate' => false ] ) ; foreach ( $ records as $ record ) { $ results [ $ slug ] [ ] = [ 'title' => $ record -> getTitle ( ) , 'id' => $ record -> id , 'link' => $ record -> link ( ) , ] ; } } $ context = [ 'results' => $ results ] ; return $ this -> render ( '@bolt/recordbrowser/recordbrowser.twig' , [ 'context' => $ context ] ) ; }
List records to easily insert links through the WYSIWYG editor.

@return \Bolt\Response\TemplateResponse
List records to easily insert links through the WYSIWYG editor .