$this->user = $this->auth->getIdentity();
$this->request->get("type")
Specify a view
$this->view->pick("item/close_window");
$robots = $connection->fetchAll($sql);
$robot = $result->fetch();
{{ link_to("my/link/" ~ variable, "My Link") }}
{{ partial("layouts/header") }}
{{ partial('tags/tag-panel',['title': '@tags','tags': attag_items]) }}
{% if show_tags %}
{% endif %}
{%- for tag in input_tags -%}
{%- endfor -%}
in layout template
{% block javascript_footer %} {% endblock %}
In controller:
$this->view->disable();
echo json_encode([1, 2, 3]);
$router->addGet('/add',['controller' => 'item','action' => 'create']);
$router->addPost('/add',['controller' => 'item','action' => 'store']);
Get url of current page
echo $this->router->getRewriteUri();
$this->view->disable();
$this->response->setContentType('application/json', 'UTF-8');
$this->response->setContent(json_encode($result));
return $this->response;
or
header('Content-type:application/json;charset=utf-8');
echo json_encode($result);
return $this->response->redirect('/profile');
$identity = $this->auth->getIdentity();
$this->flash->notice('You don\'t have access to this module: private');
{{ flash.output() }}
<?php $this->flashSession->output() ?>
$debug = new \Phalcon\Debug();
$debug->listen();