phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlSemNavElement.php
Go to the documentation of this file.
1<?php
3
6
14
19 protected $root;
20
25 protected $attr;
26
31 protected $_contentSeparator = "";
32
33 public function __construct($identifier, $tagName, $baseClass) {
34 parent::__construct($identifier, $tagName, $baseClass);
35 $this->root = "";
36 $this->attr = "data-ajax";
37 }
38
46 public function autoGetOnClick($targetSelector) {
47 return $this->getOnClick($this->root, $targetSelector, array(
48 "attr" => $this->attr
49 ));
50 }
51
52 public function contentAsString() {
53 return JArray::implode($this->_contentSeparator, $this->content);
54 }
55
56 public function setContentDivider($divider, $index = NULL) {
57 $divider = "<div class='divider'> {$divider} </div>";
58 return $this->setDivider($divider, $index);
59 }
60
61 public function setIconContentDivider($iconContentDivider, $index = NULL) {
62 $contentDivider = "<i class='" . $iconContentDivider . " icon divider'></i>";
63 return $this->setDivider($contentDivider, $index);
64 }
65
66 protected function setDivider($divider, $index) {
67 if (isset($index)) {
68 if (! \is_array($this->_contentSeparator))
69 $this->_contentSeparator = array_fill(0, $this->count() - 1, $this->_contentSeparator);
70 $this->_contentSeparator[$index] = $divider;
71 } else {
72 $this->_contentSeparator = $divider;
73 }
74 return $this;
75 }
76
77 protected function getContentDivider($index) {
78 if (\is_array($this->_contentSeparator)) {
79 return @$this->_contentSeparator[$index];
80 }
82 }
83}
getOnClick($url, $responseElement="", $parameters=array())
Performs a get to $url on the click event on $element and display it in $responseElement.
Base class for Semantic Html collections.
Sem class for navigation elements : Breadcrumbs and Pagination.
setIconContentDivider($iconContentDivider, $index=NULL)
autoGetOnClick($targetSelector)
Associate an ajax get to the elements, displayed in $targetSelector.
__construct($identifier, $tagName, $baseClass)