title: How can i use a component inside a Cell?
body: <p>I'm looking for a way to use component inside a cell, is there any way ?</p>
  
  <p>I tried : </p>
  
  <pre><code>$this-&gt;loadComponent('SessionsActivity');
  </code></pre>
  
  <p>My Cell : </p>
  
  <pre><code>namespace App\View\Cell;
  
  use Cake\Core\Configure;
  use Cake\View\Cell;
  
  class UserCell extends Cell
  </code></pre>
  
  <p>My query : </p>
  
  <pre><code>$user = $this-&gt;Users
      -&gt;find()
      -&gt;where([
          'Users.id' =&gt; $this-&gt;request-&gt;id
      ])
      -&gt;contain([
          'Towns' =&gt; function ($q) {
              return $q-&gt;find('short');
          },
          'Countries' =&gt; function ($q) {
              return $q-&gt;find('short');
          }
      ])
      -&gt;map(function ($user) {
          $user-&gt;online = $this-&gt;SessionsActivity-&gt;getOnlineStatus($user);
          return $user;
      })
      -&gt;first();
  </code></pre>