<commit_before><?php
/**
 * This is the template for generating a controller class file for CRUD feature.
 * The following variables are available in this template:
 * @var $this CrudCode
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */

echo "<?php\n";
echo "/**\n";
echo " * " . $this->controllerClass . "\n";
echo " *\n";
echo " * @method " . $this->modelClass . " loadModel() loadModel(\$id, \$model = null)\n";
echo " */\n";
echo "class " . $this->controllerClass . " extends " . $this->baseControllerClass . "\n";
echo "{\n";
echo "\n";

// access control
echo "    /**\n";
echo "     * Access Control\n";
echo "     * @return array\n";
echo "     */\n";
echo "    public function accessRules()\n";
echo "    {\n";
echo "        return array(\n";
echo "            array('allow',\n";
echo "                'actions' => array('index', 'view', 'log', 'create', 'update', 'delete'),\n";
echo "                'roles' => array('admin'),\n";
echo "                //'users' => array('*','@','?'), // all, user, guest\n";
echo "            ),\n";
echo "            array('deny', 'users' => array('*')),\n";
echo "        );\n";
echo "    }\n";
echo "\n";

// beforeRender
echo "    /**\n";
echo "     * @param string \$view the view to be rendered\n";
echo "     * @return bool\n";
echo "     */\n";
echo "    public function beforeRender(\$view)\n";
echo "    {\n";
echo "        if (\$view != 'index') {\n";
echo "            \$this->addBreadcrumb(Yii::t('app', \$this->getName(true)), Yii::app()->user->getState('index." . lcfirst($this->modelClass) . "', array('/" . lcfirst($this->modelClass) . "/index')));\n";
echo "        }\n";
echo "        return parent::beforeRender(\$view);\n";<commit_msg>remove log action from rules<commit_after><?php
/**
 * This is the template for generating a controller class file for CRUD feature.
 * The following variables are available in this template:
 * @var $this CrudCode
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */

echo "<?php\n";
echo "/**\n";
echo " * " . $this->controllerClass . "\n";
echo " *\n";
echo " * @method " . $this->modelClass . " loadModel() loadModel(\$id, \$model = null)\n";
echo " */\n";
echo "class " . $this->controllerClass . " extends " . $this->baseControllerClass . "\n";
echo "{\n";
echo "\n";

// access control
echo "    /**\n";
echo "     * Access Control\n";
echo "     * @return array\n";
echo "     */\n";
echo "    public function accessRules()\n";
echo "    {\n";
echo "        return array(\n";
echo "            array('allow',\n";
echo "                'actions' => array('index', 'view', 'create', 'update', 'delete'),\n";
echo "                'roles' => array('admin'),\n";
echo "                //'users' => array('*','@','?'), // all, user, guest\n";
echo "            ),\n";
echo "            array('deny', 'users' => array('*')),\n";
echo "        );\n";
echo "    }\n";
echo "\n";

// beforeRender
echo "    /**\n";
echo "     * @param string \$view the view to be rendered\n";
echo "     * @return bool\n";
echo "     */\n";
echo "    public function beforeRender(\$view)\n";
echo "    {\n";
echo "        if (\$view != 'index') {\n";
echo "            \$this->addBreadcrumb(Yii::t('app', \$this->getName(true)), Yii::app()->user->getState('index." . lcfirst($this->modelClass) . "', array('/" . lcfirst($this->modelClass) . "/index')));\n";
echo "        }\n";
echo "        return parent::beforeRender(\$view);\n";
{'fraction_non_alphanumeric': 0.23148148148148148, 'fraction_numerical': 0.0026455026455026454, 'mean_word_length': 2.628598848368522, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 43, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '4030341', 'n_tokens_mistral': 1284, 'n_tokens_neox': 1247, 'n_words': 324}