@@ 124-148 (lines=25) @@ | ||
121 | * |
|
122 | * @return array array of object items |
|
123 | */ |
|
124 | public function getItems() |
|
125 | { |
|
126 | if (!isset($this->items)) |
|
127 | { |
|
128 | $languages = $this->getLanguages(); |
|
129 | $count = count($languages); |
|
130 | $start = $this->getState('list.start'); |
|
131 | $limit = $this->getState('list.limit'); |
|
132 | ||
133 | if ($start > $count) |
|
134 | { |
|
135 | $start = 0; |
|
136 | } |
|
137 | ||
138 | if ($limit == 0) |
|
139 | { |
|
140 | $start = 0; |
|
141 | $limit = null; |
|
142 | } |
|
143 | ||
144 | $this->items = array_slice($languages, $start, $limit); |
|
145 | } |
|
146 | ||
147 | return $this->items; |
|
148 | } |
|
149 | ||
150 | /** |
|
151 | * Get total number of languages (according to filters) |
@@ 127-151 (lines=25) @@ | ||
124 | * |
|
125 | * @return array|mixed |
|
126 | */ |
|
127 | public function getItems() |
|
128 | { |
|
129 | if (empty($this->items)) |
|
130 | { |
|
131 | $packages = $this->_getPackages(); |
|
132 | $count = count($packages); |
|
133 | $start = $this->getState('list.start'); |
|
134 | $limit = $this->getState('list.limit'); |
|
135 | ||
136 | if ($start > $count) |
|
137 | { |
|
138 | $start = 0; |
|
139 | } |
|
140 | ||
141 | if ($limit == 0) |
|
142 | { |
|
143 | $start = 0; |
|
144 | $limit = null; |
|
145 | } |
|
146 | ||
147 | $this->items = array_slice($packages, $start, $limit); |
|
148 | } |
|
149 | ||
150 | return $this->items; |
|
151 | } |
|
152 | ||
153 | /** |
|
154 | * Get Total |
@@ 916-940 (lines=25) @@ | ||
913 | * |
|
914 | * @return array|mixed |
|
915 | */ |
|
916 | public function getItems() |
|
917 | { |
|
918 | if (!isset($this->items)) |
|
919 | { |
|
920 | $translations = $this->getTranslations(); |
|
921 | $count = count($translations); |
|
922 | $start = $this->getState('list.start'); |
|
923 | $limit = $this->getState('list.limit'); |
|
924 | ||
925 | if ($start > $count) |
|
926 | { |
|
927 | $start = 0; |
|
928 | } |
|
929 | ||
930 | if ($limit == 0) |
|
931 | { |
|
932 | $start = 0; |
|
933 | $limit = null; |
|
934 | } |
|
935 | ||
936 | $this->items = array_slice($translations, $start, $limit); |
|
937 | } |
|
938 | ||
939 | return $this->items; |
|
940 | } |
|
941 | ||
942 | /** |
|
943 | * Get total number of translations |