@@ -7,19 +7,19 @@ |
||
7 | 7 | |
8 | 8 | use Ajax\semantic\html\elements\HtmlIcon; |
9 | 9 | |
10 | -class HtmlPaginationMenu extends HtmlMenu{ |
|
10 | +class HtmlPaginationMenu extends HtmlMenu { |
|
11 | 11 | |
12 | - public function __construct( $identifier, $items=array() ){ |
|
13 | - parent::__construct( $identifier,$items); |
|
12 | + public function __construct($identifier, $items=array()) { |
|
13 | + parent::__construct($identifier, $items); |
|
14 | 14 | } |
15 | 15 | /** |
16 | 16 | * {@inheritDoc} |
17 | 17 | * @see \Ajax\common\html\BaseHtml::compile() |
18 | 18 | */ |
19 | - public function compile(JsUtils $js=NULL,$view=NULL){ |
|
19 | + public function compile(JsUtils $js=NULL, $view=NULL) { |
|
20 | 20 | $this->insertItem(new HtmlIcon("", "left chevron")); |
21 | 21 | $this->addItem(new HtmlIcon("", "right chevron")); |
22 | 22 | $this->asPagination(); |
23 | - return parent::compile($js,$view); |
|
23 | + return parent::compile($js, $view); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | use Phalcon\Mvc\View; |
8 | 8 | use Phalcon\Mvc\Controller; |
9 | 9 | |
10 | -class JsUtils extends \Ajax\JsUtils implements InjectionAwareInterface{ |
|
10 | +class JsUtils extends \Ajax\JsUtils implements InjectionAwareInterface { |
|
11 | 11 | protected $_di; |
12 | 12 | public function setDi(DiInterface $di) { |
13 | 13 | $this->_di=$di; |
@@ -18,45 +18,45 @@ discard block |
||
18 | 18 | return $this->_di; |
19 | 19 | } |
20 | 20 | |
21 | - public function getUrl($url){ |
|
21 | + public function getUrl($url) { |
|
22 | 22 | return $this->_di->get("url")->get($url); |
23 | 23 | } |
24 | 24 | |
25 | - public function addViewElement($identifier,$content,$view){ |
|
25 | + public function addViewElement($identifier, $content, $view) { |
|
26 | 26 | $controls=$view->getVar("q"); |
27 | - if (isset($controls) === false) { |
|
28 | - $controls=array (); |
|
27 | + if (isset($controls)===false) { |
|
28 | + $controls=array(); |
|
29 | 29 | } |
30 | 30 | $controls[$identifier]=$content; |
31 | 31 | $view->setVar("q", $controls); |
32 | 32 | } |
33 | 33 | |
34 | - public function forward($initialController,$controller,$action){ |
|
35 | - $dispatcher = $initialController->dispatcher; |
|
34 | + public function forward($initialController, $controller, $action) { |
|
35 | + $dispatcher=$initialController->dispatcher; |
|
36 | 36 | $dispatcher->setControllerName($controller); |
37 | 37 | $dispatcher->setActionName($action); |
38 | 38 | $dispatcher->dispatch(); |
39 | - $template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(),$dispatcher->getParams(), function ($view) { |
|
39 | + $template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(), $dispatcher->getParams(), function($view) { |
|
40 | 40 | $view->setRenderLevel(View::LEVEL_ACTION_VIEW); |
41 | 41 | }); |
42 | 42 | return $template; |
43 | 43 | } |
44 | 44 | |
45 | 45 | public function renderContent($view, $controller, $action, $params=NULL) { |
46 | - $template=$view->getRender($controller, $action, $params, function ($view) { |
|
46 | + $template=$view->getRender($controller, $action, $params, function($view) { |
|
47 | 47 | $view->setRenderLevel(View::LEVEL_ACTION_VIEW); |
48 | 48 | }); |
49 | 49 | return $template; |
50 | 50 | } |
51 | 51 | |
52 | - public function fromDispatcher($dispatcher){ |
|
52 | + public function fromDispatcher($dispatcher) { |
|
53 | 53 | $params=$dispatcher->getParams(); |
54 | 54 | $action=$dispatcher->getActionName(); |
55 | 55 | $items=array($dispatcher->getControllerName()); |
56 | - if(\sizeof($params)>0 || \strtolower($action)!="index" ){ |
|
56 | + if (\sizeof($params)>0 || \strtolower($action)!="index") { |
|
57 | 57 | $items[]=$action; |
58 | - foreach ($params as $p){ |
|
59 | - if(\is_object($p)===false) |
|
58 | + foreach ($params as $p) { |
|
59 | + if (\is_object($p)===false) |
|
60 | 60 | $items[]=$p; |
61 | 61 | } |
62 | 62 | } |
@@ -56,8 +56,9 @@ |
||
56 | 56 | if(\sizeof($params)>0 || \strtolower($action)!="index" ){ |
57 | 57 | $items[]=$action; |
58 | 58 | foreach ($params as $p){ |
59 | - if(\is_object($p)===false) |
|
60 | - $items[]=$p; |
|
59 | + if(\is_object($p)===false) { |
|
60 | + $items[]=$p; |
|
61 | + } |
|
61 | 62 | } |
62 | 63 | } |
63 | 64 | return $items; |