@@ 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 |
@@ 933-957 (lines=25) @@ | ||
930 | * |
|
931 | * @return array|mixed |
|
932 | */ |
|
933 | public function getItems() |
|
934 | { |
|
935 | if (!isset($this->items)) |
|
936 | { |
|
937 | $translations = $this->getTranslations(); |
|
938 | $count = count($translations); |
|
939 | $start = $this->getState('list.start'); |
|
940 | $limit = $this->getState('list.limit'); |
|
941 | ||
942 | if ($start > $count) |
|
943 | { |
|
944 | $start = 0; |
|
945 | } |
|
946 | ||
947 | if ($limit == 0) |
|
948 | { |
|
949 | $start = 0; |
|
950 | $limit = null; |
|
951 | } |
|
952 | ||
953 | $this->items = array_slice($translations, $start, $limit); |
|
954 | } |
|
955 | ||
956 | return $this->items; |
|
957 | } |
|
958 | ||
959 | /** |
|
960 | * Get total number of translations |