@@ -121,7 +121,6 @@ discard block |
||
| 121 | 121 | /** |
| 122 | 122 | * render the content of $controller::$action and set the response to the modal content |
| 123 | 123 | * @param JsUtils $js |
| 124 | - * @param string $title The panel title |
|
| 125 | 124 | * @param Controller $initialControllerInstance |
| 126 | 125 | * @param string $controllerName the controller name |
| 127 | 126 | * @param string $actionName the action name |
@@ -198,7 +197,7 @@ discard block |
||
| 198 | 197 | * Includes a modal-backdrop element. |
| 199 | 198 | * Alternatively, specify static for a backdrop which doesn't close the modal on click. |
| 200 | 199 | * @param Boolean $value default : true |
| 201 | - * @return HtmlModal |
|
| 200 | + * @return boolean |
|
| 202 | 201 | */ |
| 203 | 202 | public function setBackdrop($value) { |
| 204 | 203 | return $this->backdrop=$value; |
@@ -14,6 +14,9 @@ discard block |
||
| 14 | 14 | protected $_params=array(); |
| 15 | 15 | protected $_paramParts=array(); |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $identifier |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct($identifier, $header="", $content="", $actions=array()) { |
| 18 | 21 | parent::__construct($identifier, "div","ui modal"); |
| 19 | 22 | if(isset($header)){ |
@@ -27,6 +30,9 @@ discard block |
||
| 27 | 30 | } |
| 28 | 31 | } |
| 29 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $value |
|
| 35 | + */ |
|
| 30 | 36 | public function setHeader($value) { |
| 31 | 37 | $this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value); |
| 32 | 38 | return $this; |
@@ -103,6 +109,9 @@ discard block |
||
| 103 | 109 | return $this->addElementInPart(new HtmlSemDoubleElement($part."-" . $this->identifier, "div", $uiClass, $content), $part); |
| 104 | 110 | } |
| 105 | 111 | |
| 112 | + /** |
|
| 113 | + * @param BaseHtml $element |
|
| 114 | + */ |
|
| 106 | 115 | private function addElementInPart($element,$part) { |
| 107 | 116 | $this->content[$part]->addContent($element); |
| 108 | 117 | return $element; |
@@ -141,7 +150,6 @@ discard block |
||
| 141 | 150 | /** |
| 142 | 151 | * render the content of $controller::$action and set the response to the modal content |
| 143 | 152 | * @param JsUtils $js |
| 144 | - * @param string $title The panel title |
|
| 145 | 153 | * @param Controller $initialControllerInstance |
| 146 | 154 | * @param string $controllerName the controller name |
| 147 | 155 | * @param string $actionName the action name |
@@ -59,6 +59,9 @@ discard block |
||
| 59 | 59 | return $this->addComponent(new Accordion($this->js), $attachTo, $params); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string $attachTo |
|
| 64 | + */ |
|
| 62 | 65 | public function sticky($attachTo=NULL, $params=NULL) { |
| 63 | 66 | return $this->addComponent(new Sticky($this->js), $attachTo, $params); |
| 64 | 67 | } |
@@ -67,22 +70,37 @@ discard block |
||
| 67 | 70 | return $this->addComponent(new Checkbox($this->js), $attachTo, $params); |
| 68 | 71 | } |
| 69 | 72 | |
| 73 | + /** |
|
| 74 | + * @param string $attachTo |
|
| 75 | + */ |
|
| 70 | 76 | public function rating($attachTo=NULL, $params=NULL) { |
| 71 | 77 | return $this->addComponent(new Rating($this->js), $attachTo, $params); |
| 72 | 78 | } |
| 73 | 79 | |
| 80 | + /** |
|
| 81 | + * @param string $attachTo |
|
| 82 | + */ |
|
| 74 | 83 | public function progress($attachTo=NULL, $params=NULL) { |
| 75 | 84 | return $this->addComponent(new Progress($this->js), $attachTo, $params); |
| 76 | 85 | } |
| 77 | 86 | |
| 87 | + /** |
|
| 88 | + * @param string $attachTo |
|
| 89 | + */ |
|
| 78 | 90 | public function search($attachTo=NULL, $params=NULL) { |
| 79 | 91 | return $this->addComponent(new Search($this->js), $attachTo, $params); |
| 80 | 92 | } |
| 81 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $attachTo |
|
| 96 | + */ |
|
| 82 | 97 | public function dimmer($attachTo=NULL, $params=NULL) { |
| 83 | 98 | return $this->addComponent(new Dimmer($this->js), $attachTo, $params); |
| 84 | 99 | } |
| 85 | 100 | |
| 101 | + /** |
|
| 102 | + * @param string $attachTo |
|
| 103 | + */ |
|
| 86 | 104 | public function modal($attachTo=NULL, $params=NULL,$paramsParts=NULL) { |
| 87 | 105 | $result= $this->addComponent(new Modal($this->js), $attachTo, $params); |
| 88 | 106 | $result->setParamParts($paramsParts); |
@@ -50,14 +50,14 @@ |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * render the content of $controller::$action and set the response to a new panel |
|
| 54 | - * @param JsUtils $js |
|
| 55 | - * @param string $title The panel title |
|
| 56 | - * @param Controller $initialController |
|
| 57 | - * @param string $controller a Phalcon controller |
|
| 58 | - * @param string $action a Phalcon action |
|
| 59 | - * @param array $params |
|
| 60 | - */ |
|
| 53 | + * render the content of $controller::$action and set the response to a new panel |
|
| 54 | + * @param JsUtils $js |
|
| 55 | + * @param string $title The panel title |
|
| 56 | + * @param Controller $initialController |
|
| 57 | + * @param string $controller a Phalcon controller |
|
| 58 | + * @param string $action a Phalcon action |
|
| 59 | + * @param array $params |
|
| 60 | + */ |
|
| 61 | 61 | public function forwardPanel(JsUtils $js,$title,$initialController,$controller,$action,$params=array()){ |
| 62 | 62 | return $this->addPanel($title, $js->forward($initialController, $controller, $action,$params)); |
| 63 | 63 | } |
@@ -48,15 +48,15 @@ |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function renderContent($initialControllerInstance,$viewName, $params=NULL) { |
| 51 | - if ($initialControllerInstance->has('templating')) { |
|
| 52 | - return $initialControllerInstance->get('templating')->render($viewName, $params); |
|
| 53 | - } |
|
| 51 | + if ($initialControllerInstance->has('templating')) { |
|
| 52 | + return $initialControllerInstance->get('templating')->render($viewName, $params); |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - if (!$initialControllerInstance->has('twig')) { |
|
| 56 | - throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.'); |
|
| 57 | - } |
|
| 55 | + if (!$initialControllerInstance->has('twig')) { |
|
| 56 | + throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.'); |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - return $initialControllerInstance->get('twig')->render($viewName, $params); |
|
| 59 | + return $initialControllerInstance->get('twig')->render($viewName, $params); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function fromDispatcher($dispatcher){ |