Seditio Source
Root |
./othercms/croogo-4.0.7/vendor/croogo/croogo/Taxonomy/src/Controller/Api/V10/TaxonomiesController.php
<?php

namespace Croogo\Taxonomy\Controller\Api\V10;

use
Cake\Event\Event;
use
Croogo\Core\Controller\Api\AppController;

/**
 * Taxonomies Controller
 */
class TaxonomiesController extends AppController
{

    public function
initialize()
    {
       
parent::initialize();
       
$this->Auth->allow([
           
'index',
        ]);
    }

    public function
index()
    {
       
$this->Crud->on('beforePaginate', function (Event $event) {
            return
$event->getSubject()->query
               
->leftJoinWith('Terms')
                ->
leftJoinWith('Vocabularies');
        });
        return
$this->Crud->execute();
    }

}