@@ 158-165 (lines=8) @@ | ||
155 | $html = ''; |
|
156 | if (count($collection)) { |
|
157 | // Render each entity view in collection |
|
158 | foreach ($collection as $row) { |
|
159 | // Call external handler |
|
160 | if (is_callable($this->itemView)) { |
|
161 | $html .= call_user_func($this->itemView, $this->renderer, $row, $this->query); |
|
162 | } else { // Call default renderer |
|
163 | $html .= $this->renderItem($row); |
|
164 | } |
|
165 | } |
|
166 | ||
167 | // Render collection main view with items |
|
168 | if (is_callable($this->indexView)) { |
@@ 108-115 (lines=8) @@ | ||
105 | public function render() |
|
106 | { |
|
107 | $html = ''; |
|
108 | foreach ($this->collection as $row) { |
|
109 | // Call external handler |
|
110 | if (is_callable($this->rowView)) { |
|
111 | $html .= call_user_func($this->rowView, $this->renderer, $this->query, $row); |
|
112 | } else { // Call default renderer |
|
113 | $html .= $this->renderRow($row); |
|
114 | } |
|
115 | } |
|
116 | ||
117 | // Call external handler |
|
118 | if (is_callable($this->indexView)) { |