<commit_before><?php
/**
 * admin42 (www.raum42.at)
 *
 * @link http://www.raum42.at
 * @copyright Copyright (c) 2010-2014 raum42 OG (http://www.raum42.at)
 *
 */

namespace Admin42\Mvc\Controller;

use Core42\Mvc\Controller\AbstractActionController;

abstract class AbstractAdminController extends AbstractActionController
{
    /**
     * @param string $forwardController
     * @param array $params
     */
    protected function addSidebar($forwardController, array $params = array())
    {
        $this->layout()->useSidebar = true;

        $params = array_merge($this->params()->fromRoute(), $params);

        $this->layout()->addChild(
            $this->forward()->dispatch($forwardController, $params),
            'sidebar'
        );
    }
}
<commit_msg>return sidebar model in admin controller<commit_after><?php
/**
 * admin42 (www.raum42.at)
 *
 * @link http://www.raum42.at
 * @copyright Copyright (c) 2010-2014 raum42 OG (http://www.raum42.at)
 *
 */

namespace Admin42\Mvc\Controller;

use Core42\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

abstract class AbstractAdminController extends AbstractActionController
{
    /**
     * @param string $forwardController
     * @param array $params
     * @return ViewModel
     */
    protected function addSidebar($forwardController, array $params = array())
    {
        $this->layout()->useSidebar = true;

        $params = array_merge($this->params()->fromRoute(), $params);

        $this->layout()->addChild(
            $this->forward()->dispatch($forwardController, $params),
            'sidebar'
        );

        $sidebar = $this->layout()->getChildrenByCaptureTo('sidebar');

        return $sidebar[0];
    }
}

{'fraction_non_alphanumeric': 0.14883720930232558, 'fraction_numerical': 0.02616279069767442, 'mean_word_length': 3.117224880382775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5040505', 'n_tokens_mistral': 528, 'n_tokens_neox': 498, 'n_words': 97}