public function getJson($type = '')
 {
     $json = new JsonObject();
     $json->withValue('name', $this->getName());
     $json->withValue('label', $this->getLabel());
     return $json;
 }
 public function getJson($type = '')
 {
     $json = new JsonObject();
     $json->withValue('id', $this->getId())->withValue('numero', $this->getNumero())->withValue('fechaAbierta', $this->getFechaAbierta())->withValue('mozo', $this->getMozo()->getNombreCompleto())->withValue('estado', $this->getEstado()->getNombre())->withObject('pedido', $this->getPedido());
     return $json;
 }
 public function getJson($type = '')
 {
     $json = new JsonObject();
     $json->withValue('id', $this->getId())->withValue('codigo', $this->getCodigo())->withValue('nombre', $this->getNombre())->withValue('descripcion', $this->getDescripcion())->withValue('precio', $this->getPrecio());
     return $json;
 }
 public function generateJsonConfiguration($records)
 {
     //$this->setDoc($doc = new DOMDocument());
     $json = new JsonObject();
     $json->withValue('record_finder', 'record_finder');
     $json->withValue('title', $this->getTitle());
     $collectionSearchFields = new SearchableReadonlyCollection();
     $collectionSearchFields->addAll($this->searchFields);
     $json->withObject('search_fields', $this->searchFields());
     $collectionTitles = new SearchableReadonlyCollection();
     $collectionTitles->addAll($this->titleFields);
     $json->withObject('record_title', $collectionTitles);
     $collectionDescriptions = new SearchableReadonlyCollection();
     $collectionDescriptions->addAll($this->descriptionFields);
     $json->withObject('record_description', $collectionDescriptions);
     $mapper = new AsyncSearchRecordMapper();
     foreach ($this->searchFields as $searchField) {
         $mapper->addField($searchField);
     }
     foreach ($this->titleFields as $titleField) {
         $mapper->addField($titleField);
     }
     foreach ($this->descriptionFields as $descriptionField) {
         $mapper->addField($descriptionField);
     }
     $jsonArray = new JsonArray();
     if ($records != null) {
         foreach ($records as $record) {
             $jsonObject = $mapper->generateJson($record);
             $jsonArray->addObject($jsonObject);
         }
     }
     $json->addArray('records', $jsonArray);
     return $json;
 }
 public function getJson($type = '')
 {
     $json = new JsonObject();
     $json->withValue('id', $this->getId())->withValue('cantidad', $this->getCantidad())->withObject('producto', $this->getProducto());
     return $json;
 }
 public function getJson($type = '')
 {
     $json = new JsonObject();
     $json->withValue('id', $this->getId())->withValue('numero', $this->getNumero())->withValue('fecha', $this->getFecha())->withObject('estado', $this->getEstado())->withObject('detalle', $this->detalle())->withValue('total', $this->calcularTotal());
     return $json;
 }
 public function getJson($type = '')
 {
     $json = new JsonObject();
     $json->withValue('id', $this->getId())->withValue('nombre', $this->getNombre())->withValue('apellido', $this->getApellido());
     return $json;
 }