|
@@ -0,0 +1,45 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace v1\controllers;
|
|
|
+
|
|
|
+use common\rest\JsonController;
|
|
|
+
|
|
|
+class TamanoController extends JsonController {
|
|
|
+
|
|
|
+ public function actionIndex() {
|
|
|
+ $valores = [
|
|
|
+ "97x220",
|
|
|
+ "300x99",
|
|
|
+ "300x225",
|
|
|
+ "300x250",
|
|
|
+ "300x500",
|
|
|
+ "450x490",
|
|
|
+ "567x396",
|
|
|
+ "587x587",
|
|
|
+ "605x74",
|
|
|
+ "728x90",
|
|
|
+ "950x110",
|
|
|
+ "950x290",
|
|
|
+ "970x250",
|
|
|
+ "2300x700"
|
|
|
+ ];
|
|
|
+
|
|
|
+ $tamanos = array_map(function ($item) {
|
|
|
+ return [
|
|
|
+ 'value' => $item,
|
|
|
+ 'label' => $item,
|
|
|
+ ];
|
|
|
+ }, $valores);
|
|
|
+
|
|
|
+ $total = count($tamanos);
|
|
|
+ $pagina = 1; // Puedes ajustarlo si usas paginación dinámica
|
|
|
+ $limite = $total; // O usa $_GET['limite'] si lo quieres dinámico
|
|
|
+
|
|
|
+ return [
|
|
|
+ 'total' => $total,
|
|
|
+ 'pagina' => $pagina,
|
|
|
+ 'limite' => $limite,
|
|
|
+ 'resultado' => $tamanos
|
|
|
+ ];
|
|
|
+ }
|
|
|
+}
|