protected function _includeLinksToContents($view)
    {
        $items = [];
        $contents = TableRegistry::get('Content.Contents')
            ->find('all', ['fieldable' => false])
            ->contain(['ContentTypes'])
            ->where(['status' => 1])
            ->order(['sticky' => 'DESC', 'modified' => 'DESC']);

        foreach ($contents as $content) {
            $items[] = ["{$content->type}: " . h($content->title), $view->Url->build($content->url, true)];
        }

        $view->Html->scriptBlock('var linksToContentsItems = ' . json_encode($items) . ';', ['block' => true]);
        $view->Html->scriptBlock('var linksToContentsLabel = "' . __d('wysiwyg', 'Link to content') . '";', ['block' => true]);
        $view->Html->script('Wysiwyg.ckeditor.content.links.js', ['block' => true]);
    }