original_string: public function renderContent(Event $event, Content $content, $options = [])
      {
          $View = $event->subject();
          $viewMode = $View->viewMode();
          $try = [
              "Content.render_content_{$content->content_type_slug}_{$viewMode}_{$content->slug}",
              "Content.render_content_{$content->content_type_slug}_{$content->slug}",
              "Content.render_content_{$viewMode}_{$content->slug}",
              "Content.render_content_{$content->slug}",
              "Content.render_content_{$content->content_type_slug}_{$viewMode}",
              "Content.render_content_{$content->content_type_slug}",
              "Content.render_content_{$viewMode}",
              'Content.render_content',
          ];
  
          foreach ($try as $element) {
              if ($View->elementExists($element)) {
                  return $View->element($element, compact('content', 'options'));
              }
          }
  
          return '';
      }
code: public function renderContent(Event $event, Content $content, $options = [])
      {
          $View = $event->subject();
          $viewMode = $View->viewMode();
          $try = [
              "Content.render_content_{$content->content_type_slug}_{$viewMode}_{$content->slug}",
              "Content.render_content_{$content->content_type_slug}_{$content->slug}",
              "Content.render_content_{$viewMode}_{$content->slug}",
              "Content.render_content_{$content->slug}",
              "Content.render_content_{$content->content_type_slug}_{$viewMode}",
              "Content.render_content_{$content->content_type_slug}",
              "Content.render_content_{$viewMode}",
              'Content.render_content',
          ];
  
          foreach ($try as $element) {
              if ($View->elementExists($element)) {
                  return $View->element($element, compact('content', 'options'));
              }
          }
  
          return '';
      }
code_tokens: public function renderContent ( Event $ event , Content $ content , $ options = [ ] ) { $ View = $ event -> subject ( ) ; $ viewMode = $ View -> viewMode ( ) ; $ try = [ "Content.render_content_{$content->content_type_slug}_{$viewMode}_{$content->slug}" , "Content.render_content_{$content->content_type_slug}_{$content->slug}" , "Content.render_content_{$viewMode}_{$content->slug}" , "Content.render_content_{$content->slug}" , "Content.render_content_{$content->content_type_slug}_{$viewMode}" , "Content.render_content_{$content->content_type_slug}" , "Content.render_content_{$viewMode}" , 'Content.render_content' , ] ; foreach ( $ try as $ element ) { if ( $ View -> elementExists ( $ element ) ) { return $ View -> element ( $ element , compact ( 'content' , 'options' ) ) ; } } return '' ; }
docstring: Renders a single Content Entity.
  
  You can define `specialized-renders` according to your needs as follow.
  This method looks for specialized renders in the order described below,
  if one is not found we look the next one, etc.
  
  ### Content's slug based
  
  [other-render]_[content-slug].ctp
  
  Where `[other-render]` is any of the ones described below, for instance when
  rendering an article which slug is `hello-world`:
  
  - render_content_[content-type]_[view-mode]_[hello-world].ctp
  - render_content_[content-type]_[hello-world].ctp
  - render_content_[view-mode]_[hello-world].ctp
  - render_content_[hello-world].ctp
  
  If none of these exists, then it will try to use one of renders described
  below.
  
  ### Render content based on content-type & view-mode
  
  render_content_[content-type]_[view-mode].ctp
  
  Renders the given content based on `content-type` + `view-mode` combination,
  for example:
  
  - render_content_article_full.ctp: Render for "article" contents in "full"
  view-mode.
  
  - render_content_article_search-result.ctp: Render for "article" contents in
  "search-result" view-mode.
  
  - render_content_basic-page_search-result.ctp: Render for "basic-page"
  contents in "search-result" view-mode.
  
  ### Render content based on content-type
  
  render_content_[content-type].ctp
  
  Similar as before, but just based on `content-type` (and any view-mode), for
  example:
  
  - render_content_article.ctp: Render for "article" contents.
  
  - render_content_basic-page.ctp: Render for "basic-page" contents
  
  ### Render content based on view-mode
  
  render_content_[view-mode].ctp
  
  Similar as before, but just based on `view-mode` (and any content-type), for
  example:
  
  - render_content_rss.ctp: Render any content (article, page, etc) in "rss"
  view-mode.
  
  - render_content_full.ctp: Render any content (article, page, etc) in "full"
  view-mode.
  
  NOTE: To avoid collisions between `view-mode` names and `content-type` names,
  you should alway use unique and descriptive names as possible when defining
  new content types. By default, Content plugin defines the following view-
  modes: `default`, `teaser`, `search-result`, `rss`, `full`.
  
  ### Default
  
  render_content.ctp
  
  This is the global render, if none of the above renders is found we try to
  use this last. Themes can overwrite this view element by creating a new one
  at `ExampleTheme/Template/Element/render_content.ctp`.
  
  ---
  
  NOTE: Please note the difference between "_" and "-"
  
  @param \Cake\Event\Event $event The event that was triggered
  @param \Content\Model\Entity\Content $content The content to render
  @param array $options Additional options as an array
  @return string HTML
docstring_tokens: Renders a single Content Entity .