27 $menu =
new HtmlMenu(
"menu" . $this->identifier);
28 $menu->asTab(
false)->setAttachment(NULL, Side::TOP);
29 $this->content[
"menu"] = $menu;
34 return $this->content[
'menu'];
44 $count = $this->
count();
47 if (\is_array($value)) {
51 $menuItem = $this->content[
"menu"]->addItem($title);
52 $menuItem->addToProperty(
"data-tab", $menuItem->getIdentifier());
53 $menuItem->removeProperty(
"href");
55 $result->menuTab = $menuItem;
68 $segment->setAttachment(NULL, Side::BOTTOM)
69 ->addToProperty(
"class",
"tab")
70 ->addToProperty(
"data-tab", $datatab);
84 $menu = $this->content[
"menu"];
85 if ($index < $menu->
count()) {
86 if (isset($this->content[$index]) ===
false) {
90 $this->content[$index]->setContent(
$content);
102 $size = \sizeof($contents);
103 for ($i = 0; $i < $size; $i ++) {
116 $item = $this->content[
"menu"]->getItem($index);
118 $item->setActive(
true);
119 $this->content[$index]->setActive(
true);
120 $this->_activated =
true;
155 if (\array_key_exists($index, $this->content)) {
156 $this->content[$index] = $js->
forward($initialController, $controller, $action,
$params);
157 return $this->content[$index];
178 if (\array_key_exists($index, $this->content)) {
180 return $this->content[$index];
223 return $this->content[
"menu"]->setPointing($value);
227 return $this->content[
"menu"]->setSecondary();
237 return $this->content[
"menu"]->getItem($index);
247 return $this->content[$index];
257 $contentSize = \sizeof($this->content);
258 for ($i = 0; $i < $contentSize; $i ++) {
259 if ($menu->getItem($i) !== NULL) {
260 if (isset($this->content[$i])) {
261 $menu->getItem($i)->addToProperty(
"data-tab", $this->content[$i]->
getProperty(
"data-tab"));
265 $menuSize = $menu->count();
266 for ($i = 0; $i < $menuSize; $i ++) {
267 $menu->getItem($i)->removeProperty(
"href");
268 if (isset($this->content[$i]) ===
false) {
269 $this->content[$i] = $this->
createSegment($i,
"New content", $menu->getItem($i)
272 $menu->getItem($i)->addToProperty(
"data-tab", $this->content[$i]->
getProperty(
"data-tab"));
275 $this->content[
"menu"] = $menu;
284 if (isset($this->_bsComponent) ===
false)
285 $this->_bsComponent = $js->
semantic()->tab(
"#" . $this->identifier .
" .item", $this->params);
291 if (! $this->_activated && $this->content[
"menu"]->
count() > 0 && \
sizeof($this->content) > 1)
293 return parent::compile($js, $view);
297 parent::setInverted($recursive);
298 $this->content[
'menu']->addClass(
'inverted');
forward($initialController, $controller, $action, $params)
Forwards to.
renderContent($initialControllerInstance, $viewName, $params=NULL)
render the content of an existing view : $viewName and set the response to the modal content Used int...
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
addItem($item)
adds and returns an item
addEventsOnRun(JsUtils $js=NULL)
Base class for Semantic Html collections.
Semantic Segment element.
setPointing($value=Direction::NONE)
setTabsContent($contents)
Sets all contents of tabs.
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\Bas...
getTab($index)
Returns the tab at position $index.
createItem($value)
{The item factory.}
forwardTab($index, JsUtils $js, $title, $initialController, $controller, $action, $params=array())
Renders the content of.
renderViewTab($index, JsUtils $js, $title, $initialController, $viewName, $params=array())
Renders the content of an existing view : $controller/$action and sets the response to the tab at $in...
setMenu($menu)
Sets the menu of tabs.
setInverted($recursive=true)
can be formatted to appear on dark backgrounds
addAndRenderViewTab(JsUtils $js, $title, $initialController, $viewName, $params=array())
render the content of an existing view : $controller/$action and set the response to a new tab
setTabContent($index, $content)
Sets the content of the tab at position $index.
compile(JsUtils $js=NULL, &$view=NULL)
addAndForwardTab(JsUtils $js, $title, $initialController, $controller, $action, $params=array())
render the content of
__construct($identifier, $tabs=array())
activate($index)
Activates the tab element at $index.
addTab($title, $content)
Adds a new tab.
getMenuTab($index)
Returns the menu item at position $index.
createSegment($count, $content, $datatab)