original_string: 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]);
      }
code: 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]);
      }
code_tokens: 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 ] ) ; }
docstring: Alters CKEditor's link plugin.
  
  Allows to link to QuickAppsCMS's contents, adds to layout header some JS code
  and files.
  
  @param \Cake\View\View $view Instance of view class
  @return void
docstring_tokens: Alters CKEditor s link plugin .