24 parent::__construct(
$identifier,
'div',
'ui modal');
31 if (isset($actions)) {
37 $this->content[
'header'] =
new HtmlSemDoubleElement(
'header-' . $this->identifier,
'a',
'header', $value);
42 $this->content[
'content'] =
new HtmlSemDoubleElement(
'content-' . $this->identifier,
'div',
'content', $value);
53 $this->content[
'actions'] =
new HtmlSemDoubleElement(
'content-' . $this->identifier,
'div',
'actions');
55 if (\is_array($actions)) {
56 foreach ($actions as $action) {
73 if (\array_search($action, [
80 if (\array_search($action, [
89 $action->addToProperty(
'class', $class);
100 return $this->content[
'actions']->getContent()[$index];
104 $this->content[
'content']->addContent(
$content, $before);
109 $content = $this->content[
'content'];
110 if (isset($description)) {
111 $description =
new HtmlSemDoubleElement(
'description-' . $this->identifier,
'div',
'description', $description);
112 $content->addContent($description,
true);
115 $img =
new HtmlImage(
'image-' . $this->identifier, $image,
'',
'medium');
117 $content->addToProperty(
'class',
'image');
123 $content = $this->content[
'content'];
124 if (isset($description)) {
125 $description =
new HtmlSemDoubleElement(
'description-' . $this->identifier,
'div',
'description', $description);
126 $content->addContent($description,
true);
129 $img =
new HtmlIcon(
'image-' . $this->identifier, $icon);
131 $content->addToProperty(
'class',
'image');
137 $this->content[$part]->addContent($element);
142 $value = $value ?
'show' :
'hide';
143 $this->_paramParts[] = [
144 "'" . $value .
" dimmer'" 150 $this->_params[
'inverted'] =
true;
159 $this->_paramParts[] = [
190 public function forward(
JsUtils $js, $initialControllerInstance, $controllerName, $actionName, $params = NULL) {
191 return $this->
setContent($js->
forward($initialControllerInstance, $controllerName, $actionName, $params));
206 if (isset($this->_params[
'inverted']) && $this->_params[
'inverted']) {
209 return parent::compile($js, $view);
217 if (isset($this->_bsComponent) ===
false)
218 $this->_bsComponent = $js->
semantic()->modal(
'#' . $this->identifier, $this->_params, $this->_paramParts);
223 public function jsDo($behavior) {
224 return "$('#" . $this->identifier .
"').modal('" . $behavior .
"');";
228 return $this->
jsDo(
'hide');
232 $this->_params[
'onHidden'] = $js;
BaseHtml for HTML components.
addToProperty($name, $value, $separator=" ")
forward(JsUtils $js, $initialControllerInstance, $controllerName, $actionName, $params=NULL)
render the content of
addImageContent($image, $description=NULL)
__construct($identifier, $header='', $content='', $actions=null)
addEventsOnRun(JsUtils $js=NULL)
setActions($actions)
Adds the modal actions (buttons).
addElementInPart($element, $part)
Semantic Image component.
compile(JsUtils $js=NULL, &$view=NULL)
{}
addContent($content, $before=false)
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Base class for Semantic double elements.
forward($initialController, $controller, $action, $params)
Forwards to.
renderView(JsUtils $js, $initialController, $viewName, $params=array())
render the content of an existing view : $controller/$action and set the response to the modal conten...
setInverted($recursive=true)
renderContent($initialControllerInstance, $viewName, $params=NULL)
render the content of an existing view : $viewName and set the response to the modal content Used int...
static sortAssociative($array, $sortedKeys=array())
addIconContent($icon, $description=NULL)
setInverted($recursive=true)
can be formatted to appear on dark backgrounds