marc-leopold/cms/plugins/rainlab/builder/classes/controllergenerator/templates/controller.php.tpl

24 lines
631 B
Smarty
Raw Normal View History

2019-02-25 14:56:59 +00:00
<?php namespace {{ pluginNamespace }}\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class {{ controller }} extends Controller
{
public $implement = [{% for behavior in behaviors %}
'{{ behavior }}'{% if not loop.last %},{% endif %}{% endfor %}
];
{{ templateParts|raw }}
public function __construct()
{
parent::__construct();
{% if menuItem %}
{% if not sideMenuItem %}
BackendMenu::setContext('{{ pluginCode }}', '{{ menuItem }}');
{% else %}
BackendMenu::setContext('{{ pluginCode }}', '{{ menuItem }}', '{{ sideMenuItem }}');
{% endif %}
{% endif %}
}
}