Обработка action у компонента

This commit is contained in:
origami11 2017-05-12 14:13:41 +03:00
parent ca198452ef
commit b3f11fc85f
2 changed files with 11 additions and 1 deletions

View file

@ -66,7 +66,13 @@ class Controller_Component
function execute(HttpRequest $request, $has_id = true) {
$crequest = new ComponentRequest($this->component_id, $request);
$action = 'action' . ucfirst($request->get('action', 'index'));
$_action = $request->get('action', 'index');
if (is_array($_action)) {
$action = 'action' . ucfirst(Arr::get($_action, $this->component_id, 'index'));
} else {
$action = 'action' . ucfirst($_action);
}
$this->before();
if (method_exists($this, $action)) {

View file

@ -40,6 +40,10 @@ class Mail
$this->_to = $name;
}
function replyTo($name) // recipient
{
}
/**
* Установка получателей копии
*/