#2 Correcciones Bugs

   Mejoras Backend y Modelos
   Cambio en la API rest PHP		
parent 1606b41e
...@@ -90,6 +90,8 @@ ...@@ -90,6 +90,8 @@
<column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/> <column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/>
<column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/> <column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/>
<column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/> <column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/>
<column name="cco_clase_css" phpName="CcoClaseCss" type="VARCHAR" size="255" required="false"/>
<column name="cco_disposicion_nombre" phpName="CcoDisposicionNombre" type="VARCHAR" size="255" required="false"/>
<column name="cco_estado" phpName="CcoEstado" type="INTEGER" required="false"/> <column name="cco_estado" phpName="CcoEstado" type="INTEGER" required="false"/>
<column name="cco_eliminado" phpName="CcoEliminado" type="INTEGER" required="false"/> <column name="cco_eliminado" phpName="CcoEliminado" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/> <column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
......
...@@ -6,4 +6,8 @@ use AppBundle\Model\om\BaseDisposicionColumnasQuery; ...@@ -6,4 +6,8 @@ use AppBundle\Model\om\BaseDisposicionColumnasQuery;
class DisposicionColumnasQuery extends BaseDisposicionColumnasQuery class DisposicionColumnasQuery extends BaseDisposicionColumnasQuery
{ {
public static function getNombreDisposicion(CampaniaContenido $contenido){
$obj = self::create()->filterByDcoId($contenido->getDcoId())->findOne();
return $obj->getDcoNombre();
}
} }
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
namespace AppBundle\Model; namespace AppBundle\Model;
use AppBundle\Model\om\BaseTemplateCssRelacionQuery; use AppBundle\Model\om\BaseTemplateCssRelacionQuery;
use AppBundle\Model\Campania;
class TemplateCssRelacionQuery extends BaseTemplateCssRelacionQuery class TemplateCssRelacionQuery extends BaseTemplateCssRelacionQuery
{ {
public static function getCss(CampaniaContenido $contenido, Campania $campania){
$obj = self::create()->filterByTemId($campania->getTemId())->filterByDcoId($contenido->getDcoId())->filterByTcrTipo($contenido->getCcoTipo())->filterByTcrEntorno($contenido->getDisId())->findOne();
return $obj->getTcrClaseCss();
}
} }
...@@ -54,6 +54,8 @@ class CampaniaContenidoTableMap extends TableMap ...@@ -54,6 +54,8 @@ class CampaniaContenidoTableMap extends TableMap
$this->addColumn('cco_columna', 'CcoColumna', 'INTEGER', false, null, null); $this->addColumn('cco_columna', 'CcoColumna', 'INTEGER', false, null, null);
$this->addColumn('cco_orden', 'CcoOrden', 'INTEGER', false, null, null); $this->addColumn('cco_orden', 'CcoOrden', 'INTEGER', false, null, null);
$this->addColumn('cco_tipo', 'CcoTipo', 'INTEGER', false, null, null); $this->addColumn('cco_tipo', 'CcoTipo', 'INTEGER', false, null, null);
$this->addColumn('cco_clase_css', 'CcoClaseCss', 'VARCHAR', false, 255, null);
$this->addColumn('cco_disposicion_nombre', 'CcoDisposicionNombre', 'VARCHAR', false, 255, null);
$this->addColumn('cco_estado', 'CcoEstado', 'INTEGER', false, null, null); $this->addColumn('cco_estado', 'CcoEstado', 'INTEGER', false, null, null);
$this->addColumn('cco_eliminado', 'CcoEliminado', 'INTEGER', false, null, null); $this->addColumn('cco_eliminado', 'CcoEliminado', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
......
...@@ -120,6 +120,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -120,6 +120,18 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
*/ */
protected $cco_tipo; protected $cco_tipo;
/**
* The value for the cco_clase_css field.
* @var string
*/
protected $cco_clase_css;
/**
* The value for the cco_disposicion_nombre field.
* @var string
*/
protected $cco_disposicion_nombre;
/** /**
* The value for the cco_estado field. * The value for the cco_estado field.
* @var int * @var int
...@@ -321,6 +333,28 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -321,6 +333,28 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->cco_tipo; return $this->cco_tipo;
} }
/**
* Get the [cco_clase_css] column value.
*
* @return string
*/
public function getCcoClaseCss()
{
return $this->cco_clase_css;
}
/**
* Get the [cco_disposicion_nombre] column value.
*
* @return string
*/
public function getCcoDisposicionNombre()
{
return $this->cco_disposicion_nombre;
}
/** /**
* Get the [cco_estado] column value. * Get the [cco_estado] column value.
* *
...@@ -695,6 +729,48 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -695,6 +729,48 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this; return $this;
} // setCcoTipo() } // setCcoTipo()
/**
* Set the value of [cco_clase_css] column.
*
* @param string $v new value
* @return CampaniaContenido The current object (for fluent API support)
*/
public function setCcoClaseCss($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->cco_clase_css !== $v) {
$this->cco_clase_css = $v;
$this->modifiedColumns[] = CampaniaContenidoPeer::CCO_CLASE_CSS;
}
return $this;
} // setCcoClaseCss()
/**
* Set the value of [cco_disposicion_nombre] column.
*
* @param string $v new value
* @return CampaniaContenido The current object (for fluent API support)
*/
public function setCcoDisposicionNombre($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->cco_disposicion_nombre !== $v) {
$this->cco_disposicion_nombre = $v;
$this->modifiedColumns[] = CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE;
}
return $this;
} // setCcoDisposicionNombre()
/** /**
* Set the value of [cco_estado] column. * Set the value of [cco_estado] column.
* *
...@@ -827,10 +903,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -827,10 +903,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->cco_columna = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null; $this->cco_columna = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
$this->cco_orden = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null; $this->cco_orden = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
$this->cco_tipo = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null; $this->cco_tipo = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
$this->cco_estado = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null; $this->cco_clase_css = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
$this->cco_eliminado = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null; $this->cco_disposicion_nombre = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
$this->created_at = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null; $this->cco_estado = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
$this->updated_at = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null; $this->cco_eliminado = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
$this->created_at = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null;
$this->updated_at = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
...@@ -840,7 +918,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -840,7 +918,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
} }
$this->postHydrate($row, $startcol, $rehydrate); $this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 16; // 16 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS. return $startcol + 18; // 18 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CampaniaContenido object", $e); throw new PropelException("Error populating CampaniaContenido object", $e);
...@@ -1159,6 +1237,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1159,6 +1237,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_TIPO)) { if ($this->isColumnModified(CampaniaContenidoPeer::CCO_TIPO)) {
$modifiedColumns[':p' . $index++] = '`cco_tipo`'; $modifiedColumns[':p' . $index++] = '`cco_tipo`';
} }
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_CLASE_CSS)) {
$modifiedColumns[':p' . $index++] = '`cco_clase_css`';
}
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE)) {
$modifiedColumns[':p' . $index++] = '`cco_disposicion_nombre`';
}
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ESTADO)) { if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ESTADO)) {
$modifiedColumns[':p' . $index++] = '`cco_estado`'; $modifiedColumns[':p' . $index++] = '`cco_estado`';
} }
...@@ -1218,6 +1302,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1218,6 +1302,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
case '`cco_tipo`': case '`cco_tipo`':
$stmt->bindValue($identifier, $this->cco_tipo, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->cco_tipo, PDO::PARAM_INT);
break; break;
case '`cco_clase_css`':
$stmt->bindValue($identifier, $this->cco_clase_css, PDO::PARAM_STR);
break;
case '`cco_disposicion_nombre`':
$stmt->bindValue($identifier, $this->cco_disposicion_nombre, PDO::PARAM_STR);
break;
case '`cco_estado`': case '`cco_estado`':
$stmt->bindValue($identifier, $this->cco_estado, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->cco_estado, PDO::PARAM_INT);
break; break;
...@@ -1437,15 +1527,21 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1437,15 +1527,21 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->getCcoTipo(); return $this->getCcoTipo();
break; break;
case 12: case 12:
return $this->getCcoEstado(); return $this->getCcoClaseCss();
break; break;
case 13: case 13:
return $this->getCcoEliminado(); return $this->getCcoDisposicionNombre();
break; break;
case 14: case 14:
return $this->getCreatedAt(); return $this->getCcoEstado();
break; break;
case 15: case 15:
return $this->getCcoEliminado();
break;
case 16:
return $this->getCreatedAt();
break;
case 17:
return $this->getUpdatedAt(); return $this->getUpdatedAt();
break; break;
default: default:
...@@ -1489,10 +1585,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1489,10 +1585,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$keys[9] => $this->getCcoColumna(), $keys[9] => $this->getCcoColumna(),
$keys[10] => $this->getCcoOrden(), $keys[10] => $this->getCcoOrden(),
$keys[11] => $this->getCcoTipo(), $keys[11] => $this->getCcoTipo(),
$keys[12] => $this->getCcoEstado(), $keys[12] => $this->getCcoClaseCss(),
$keys[13] => $this->getCcoEliminado(), $keys[13] => $this->getCcoDisposicionNombre(),
$keys[14] => $this->getCreatedAt(), $keys[14] => $this->getCcoEstado(),
$keys[15] => $this->getUpdatedAt(), $keys[15] => $this->getCcoEliminado(),
$keys[16] => $this->getCreatedAt(),
$keys[17] => $this->getUpdatedAt(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) { foreach ($virtualColumns as $key => $virtualColumn) {
...@@ -1586,15 +1684,21 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1586,15 +1684,21 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->setCcoTipo($value); $this->setCcoTipo($value);
break; break;
case 12: case 12:
$this->setCcoEstado($value); $this->setCcoClaseCss($value);
break; break;
case 13: case 13:
$this->setCcoEliminado($value); $this->setCcoDisposicionNombre($value);
break; break;
case 14: case 14:
$this->setCreatedAt($value); $this->setCcoEstado($value);
break; break;
case 15: case 15:
$this->setCcoEliminado($value);
break;
case 16:
$this->setCreatedAt($value);
break;
case 17:
$this->setUpdatedAt($value); $this->setUpdatedAt($value);
break; break;
} // switch() } // switch()
...@@ -1633,10 +1737,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1633,10 +1737,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if (array_key_exists($keys[9], $arr)) $this->setCcoColumna($arr[$keys[9]]); if (array_key_exists($keys[9], $arr)) $this->setCcoColumna($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setCcoOrden($arr[$keys[10]]); if (array_key_exists($keys[10], $arr)) $this->setCcoOrden($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setCcoTipo($arr[$keys[11]]); if (array_key_exists($keys[11], $arr)) $this->setCcoTipo($arr[$keys[11]]);
if (array_key_exists($keys[12], $arr)) $this->setCcoEstado($arr[$keys[12]]); if (array_key_exists($keys[12], $arr)) $this->setCcoClaseCss($arr[$keys[12]]);
if (array_key_exists($keys[13], $arr)) $this->setCcoEliminado($arr[$keys[13]]); if (array_key_exists($keys[13], $arr)) $this->setCcoDisposicionNombre($arr[$keys[13]]);
if (array_key_exists($keys[14], $arr)) $this->setCreatedAt($arr[$keys[14]]); if (array_key_exists($keys[14], $arr)) $this->setCcoEstado($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]); if (array_key_exists($keys[15], $arr)) $this->setCcoEliminado($arr[$keys[15]]);
if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);
if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);
} }
/** /**
...@@ -1660,6 +1766,8 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1660,6 +1766,8 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_COLUMNA)) $criteria->add(CampaniaContenidoPeer::CCO_COLUMNA, $this->cco_columna); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_COLUMNA)) $criteria->add(CampaniaContenidoPeer::CCO_COLUMNA, $this->cco_columna);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ORDEN)) $criteria->add(CampaniaContenidoPeer::CCO_ORDEN, $this->cco_orden); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ORDEN)) $criteria->add(CampaniaContenidoPeer::CCO_ORDEN, $this->cco_orden);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_TIPO)) $criteria->add(CampaniaContenidoPeer::CCO_TIPO, $this->cco_tipo); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_TIPO)) $criteria->add(CampaniaContenidoPeer::CCO_TIPO, $this->cco_tipo);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_CLASE_CSS)) $criteria->add(CampaniaContenidoPeer::CCO_CLASE_CSS, $this->cco_clase_css);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE)) $criteria->add(CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE, $this->cco_disposicion_nombre);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ESTADO)) $criteria->add(CampaniaContenidoPeer::CCO_ESTADO, $this->cco_estado); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ESTADO)) $criteria->add(CampaniaContenidoPeer::CCO_ESTADO, $this->cco_estado);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ELIMINADO)) $criteria->add(CampaniaContenidoPeer::CCO_ELIMINADO, $this->cco_eliminado); if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ELIMINADO)) $criteria->add(CampaniaContenidoPeer::CCO_ELIMINADO, $this->cco_eliminado);
if ($this->isColumnModified(CampaniaContenidoPeer::CREATED_AT)) $criteria->add(CampaniaContenidoPeer::CREATED_AT, $this->created_at); if ($this->isColumnModified(CampaniaContenidoPeer::CREATED_AT)) $criteria->add(CampaniaContenidoPeer::CREATED_AT, $this->created_at);
...@@ -1738,6 +1846,8 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -1738,6 +1846,8 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$copyObj->setCcoColumna($this->getCcoColumna()); $copyObj->setCcoColumna($this->getCcoColumna());
$copyObj->setCcoOrden($this->getCcoOrden()); $copyObj->setCcoOrden($this->getCcoOrden());
$copyObj->setCcoTipo($this->getCcoTipo()); $copyObj->setCcoTipo($this->getCcoTipo());
$copyObj->setCcoClaseCss($this->getCcoClaseCss());
$copyObj->setCcoDisposicionNombre($this->getCcoDisposicionNombre());
$copyObj->setCcoEstado($this->getCcoEstado()); $copyObj->setCcoEstado($this->getCcoEstado());
$copyObj->setCcoEliminado($this->getCcoEliminado()); $copyObj->setCcoEliminado($this->getCcoEliminado());
$copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setCreatedAt($this->getCreatedAt());
...@@ -2077,6 +2187,8 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent ...@@ -2077,6 +2187,8 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->cco_columna = null; $this->cco_columna = null;
$this->cco_orden = null; $this->cco_orden = null;
$this->cco_tipo = null; $this->cco_tipo = null;
$this->cco_clase_css = null;
$this->cco_disposicion_nombre = null;
$this->cco_estado = null; $this->cco_estado = null;
$this->cco_eliminado = null; $this->cco_eliminado = null;
$this->created_at = null; $this->created_at = null;
......
...@@ -34,13 +34,13 @@ abstract class BaseCampaniaContenidoPeer ...@@ -34,13 +34,13 @@ abstract class BaseCampaniaContenidoPeer
const TM_CLASS = 'AppBundle\\Model\\map\\CampaniaContenidoTableMap'; const TM_CLASS = 'AppBundle\\Model\\map\\CampaniaContenidoTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 16; const NUM_COLUMNS = 18;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 16; const NUM_HYDRATE_COLUMNS = 18;
/** the column name for the cco_id field */ /** the column name for the cco_id field */
const CCO_ID = 'campania_contenido.cco_id'; const CCO_ID = 'campania_contenido.cco_id';
...@@ -78,6 +78,12 @@ abstract class BaseCampaniaContenidoPeer ...@@ -78,6 +78,12 @@ abstract class BaseCampaniaContenidoPeer
/** the column name for the cco_tipo field */ /** the column name for the cco_tipo field */
const CCO_TIPO = 'campania_contenido.cco_tipo'; const CCO_TIPO = 'campania_contenido.cco_tipo';
/** the column name for the cco_clase_css field */
const CCO_CLASE_CSS = 'campania_contenido.cco_clase_css';
/** the column name for the cco_disposicion_nombre field */
const CCO_DISPOSICION_NOMBRE = 'campania_contenido.cco_disposicion_nombre';
/** the column name for the cco_estado field */ /** the column name for the cco_estado field */
const CCO_ESTADO = 'campania_contenido.cco_estado'; const CCO_ESTADO = 'campania_contenido.cco_estado';
...@@ -109,12 +115,12 @@ abstract class BaseCampaniaContenidoPeer ...@@ -109,12 +115,12 @@ abstract class BaseCampaniaContenidoPeer
* e.g. CampaniaContenidoPeer::$fieldNames[CampaniaContenidoPeer::TYPE_PHPNAME][0] = 'Id' * e.g. CampaniaContenidoPeer::$fieldNames[CampaniaContenidoPeer::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('CcoId', 'CamId', 'DisId', 'DcoId', 'SecId', 'FilId', 'CcoEntorno', 'CcoContenido', 'CcoFila', 'CcoColumna', 'CcoOrden', 'CcoTipo', 'CcoEstado', 'CcoEliminado', 'CreatedAt', 'UpdatedAt', ), BasePeer::TYPE_PHPNAME => array ('CcoId', 'CamId', 'DisId', 'DcoId', 'SecId', 'FilId', 'CcoEntorno', 'CcoContenido', 'CcoFila', 'CcoColumna', 'CcoOrden', 'CcoTipo', 'CcoClaseCss', 'CcoDisposicionNombre', 'CcoEstado', 'CcoEliminado', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId', 'camId', 'disId', 'dcoId', 'secId', 'filId', 'ccoEntorno', 'ccoContenido', 'ccoFila', 'ccoColumna', 'ccoOrden', 'ccoTipo', 'ccoEstado', 'ccoEliminado', 'createdAt', 'updatedAt', ), BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId', 'camId', 'disId', 'dcoId', 'secId', 'filId', 'ccoEntorno', 'ccoContenido', 'ccoFila', 'ccoColumna', 'ccoOrden', 'ccoTipo', 'ccoClaseCss', 'ccoDisposicionNombre', 'ccoEstado', 'ccoEliminado', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID, CampaniaContenidoPeer::CAM_ID, CampaniaContenidoPeer::DIS_ID, CampaniaContenidoPeer::DCO_ID, CampaniaContenidoPeer::SEC_ID, CampaniaContenidoPeer::FIL_ID, CampaniaContenidoPeer::CCO_ENTORNO, CampaniaContenidoPeer::CCO_CONTENIDO, CampaniaContenidoPeer::CCO_FILA, CampaniaContenidoPeer::CCO_COLUMNA, CampaniaContenidoPeer::CCO_ORDEN, CampaniaContenidoPeer::CCO_TIPO, CampaniaContenidoPeer::CCO_ESTADO, CampaniaContenidoPeer::CCO_ELIMINADO, CampaniaContenidoPeer::CREATED_AT, CampaniaContenidoPeer::UPDATED_AT, ), BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID, CampaniaContenidoPeer::CAM_ID, CampaniaContenidoPeer::DIS_ID, CampaniaContenidoPeer::DCO_ID, CampaniaContenidoPeer::SEC_ID, CampaniaContenidoPeer::FIL_ID, CampaniaContenidoPeer::CCO_ENTORNO, CampaniaContenidoPeer::CCO_CONTENIDO, CampaniaContenidoPeer::CCO_FILA, CampaniaContenidoPeer::CCO_COLUMNA, CampaniaContenidoPeer::CCO_ORDEN, CampaniaContenidoPeer::CCO_TIPO, CampaniaContenidoPeer::CCO_CLASE_CSS, CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE, CampaniaContenidoPeer::CCO_ESTADO, CampaniaContenidoPeer::CCO_ELIMINADO, CampaniaContenidoPeer::CREATED_AT, CampaniaContenidoPeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID', 'CAM_ID', 'DIS_ID', 'DCO_ID', 'SEC_ID', 'FIL_ID', 'CCO_ENTORNO', 'CCO_CONTENIDO', 'CCO_FILA', 'CCO_COLUMNA', 'CCO_ORDEN', 'CCO_TIPO', 'CCO_ESTADO', 'CCO_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ), BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID', 'CAM_ID', 'DIS_ID', 'DCO_ID', 'SEC_ID', 'FIL_ID', 'CCO_ENTORNO', 'CCO_CONTENIDO', 'CCO_FILA', 'CCO_COLUMNA', 'CCO_ORDEN', 'CCO_TIPO', 'CCO_CLASE_CSS', 'CCO_DISPOSICION_NOMBRE', 'CCO_ESTADO', 'CCO_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('cco_id', 'cam_id', 'dis_id', 'dco_id', 'sec_id', 'fil_id', 'cco_entorno', 'cco_contenido', 'cco_fila', 'cco_columna', 'cco_orden', 'cco_tipo', 'cco_estado', 'cco_eliminado', 'created_at', 'updated_at', ), BasePeer::TYPE_FIELDNAME => array ('cco_id', 'cam_id', 'dis_id', 'dco_id', 'sec_id', 'fil_id', 'cco_entorno', 'cco_contenido', 'cco_fila', 'cco_columna', 'cco_orden', 'cco_tipo', 'cco_clase_css', 'cco_disposicion_nombre', 'cco_estado', 'cco_eliminado', 'created_at', 'updated_at', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
); );
/** /**
...@@ -124,12 +130,12 @@ abstract class BaseCampaniaContenidoPeer ...@@ -124,12 +130,12 @@ abstract class BaseCampaniaContenidoPeer
* e.g. CampaniaContenidoPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. CampaniaContenidoPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('CcoId' => 0, 'CamId' => 1, 'DisId' => 2, 'DcoId' => 3, 'SecId' => 4, 'FilId' => 5, 'CcoEntorno' => 6, 'CcoContenido' => 7, 'CcoFila' => 8, 'CcoColumna' => 9, 'CcoOrden' => 10, 'CcoTipo' => 11, 'CcoEstado' => 12, 'CcoEliminado' => 13, 'CreatedAt' => 14, 'UpdatedAt' => 15, ), BasePeer::TYPE_PHPNAME => array ('CcoId' => 0, 'CamId' => 1, 'DisId' => 2, 'DcoId' => 3, 'SecId' => 4, 'FilId' => 5, 'CcoEntorno' => 6, 'CcoContenido' => 7, 'CcoFila' => 8, 'CcoColumna' => 9, 'CcoOrden' => 10, 'CcoTipo' => 11, 'CcoClaseCss' => 12, 'CcoDisposicionNombre' => 13, 'CcoEstado' => 14, 'CcoEliminado' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId' => 0, 'camId' => 1, 'disId' => 2, 'dcoId' => 3, 'secId' => 4, 'filId' => 5, 'ccoEntorno' => 6, 'ccoContenido' => 7, 'ccoFila' => 8, 'ccoColumna' => 9, 'ccoOrden' => 10, 'ccoTipo' => 11, 'ccoEstado' => 12, 'ccoEliminado' => 13, 'createdAt' => 14, 'updatedAt' => 15, ), BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId' => 0, 'camId' => 1, 'disId' => 2, 'dcoId' => 3, 'secId' => 4, 'filId' => 5, 'ccoEntorno' => 6, 'ccoContenido' => 7, 'ccoFila' => 8, 'ccoColumna' => 9, 'ccoOrden' => 10, 'ccoTipo' => 11, 'ccoClaseCss' => 12, 'ccoDisposicionNombre' => 13, 'ccoEstado' => 14, 'ccoEliminado' => 15, 'createdAt' => 16, 'updatedAt' => 17, ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID => 0, CampaniaContenidoPeer::CAM_ID => 1, CampaniaContenidoPeer::DIS_ID => 2, CampaniaContenidoPeer::DCO_ID => 3, CampaniaContenidoPeer::SEC_ID => 4, CampaniaContenidoPeer::FIL_ID => 5, CampaniaContenidoPeer::CCO_ENTORNO => 6, CampaniaContenidoPeer::CCO_CONTENIDO => 7, CampaniaContenidoPeer::CCO_FILA => 8, CampaniaContenidoPeer::CCO_COLUMNA => 9, CampaniaContenidoPeer::CCO_ORDEN => 10, CampaniaContenidoPeer::CCO_TIPO => 11, CampaniaContenidoPeer::CCO_ESTADO => 12, CampaniaContenidoPeer::CCO_ELIMINADO => 13, CampaniaContenidoPeer::CREATED_AT => 14, CampaniaContenidoPeer::UPDATED_AT => 15, ), BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID => 0, CampaniaContenidoPeer::CAM_ID => 1, CampaniaContenidoPeer::DIS_ID => 2, CampaniaContenidoPeer::DCO_ID => 3, CampaniaContenidoPeer::SEC_ID => 4, CampaniaContenidoPeer::FIL_ID => 5, CampaniaContenidoPeer::CCO_ENTORNO => 6, CampaniaContenidoPeer::CCO_CONTENIDO => 7, CampaniaContenidoPeer::CCO_FILA => 8, CampaniaContenidoPeer::CCO_COLUMNA => 9, CampaniaContenidoPeer::CCO_ORDEN => 10, CampaniaContenidoPeer::CCO_TIPO => 11, CampaniaContenidoPeer::CCO_CLASE_CSS => 12, CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE => 13, CampaniaContenidoPeer::CCO_ESTADO => 14, CampaniaContenidoPeer::CCO_ELIMINADO => 15, CampaniaContenidoPeer::CREATED_AT => 16, CampaniaContenidoPeer::UPDATED_AT => 17, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID' => 0, 'CAM_ID' => 1, 'DIS_ID' => 2, 'DCO_ID' => 3, 'SEC_ID' => 4, 'FIL_ID' => 5, 'CCO_ENTORNO' => 6, 'CCO_CONTENIDO' => 7, 'CCO_FILA' => 8, 'CCO_COLUMNA' => 9, 'CCO_ORDEN' => 10, 'CCO_TIPO' => 11, 'CCO_ESTADO' => 12, 'CCO_ELIMINADO' => 13, 'CREATED_AT' => 14, 'UPDATED_AT' => 15, ), BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID' => 0, 'CAM_ID' => 1, 'DIS_ID' => 2, 'DCO_ID' => 3, 'SEC_ID' => 4, 'FIL_ID' => 5, 'CCO_ENTORNO' => 6, 'CCO_CONTENIDO' => 7, 'CCO_FILA' => 8, 'CCO_COLUMNA' => 9, 'CCO_ORDEN' => 10, 'CCO_TIPO' => 11, 'CCO_CLASE_CSS' => 12, 'CCO_DISPOSICION_NOMBRE' => 13, 'CCO_ESTADO' => 14, 'CCO_ELIMINADO' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ),
BasePeer::TYPE_FIELDNAME => array ('cco_id' => 0, 'cam_id' => 1, 'dis_id' => 2, 'dco_id' => 3, 'sec_id' => 4, 'fil_id' => 5, 'cco_entorno' => 6, 'cco_contenido' => 7, 'cco_fila' => 8, 'cco_columna' => 9, 'cco_orden' => 10, 'cco_tipo' => 11, 'cco_estado' => 12, 'cco_eliminado' => 13, 'created_at' => 14, 'updated_at' => 15, ), BasePeer::TYPE_FIELDNAME => array ('cco_id' => 0, 'cam_id' => 1, 'dis_id' => 2, 'dco_id' => 3, 'sec_id' => 4, 'fil_id' => 5, 'cco_entorno' => 6, 'cco_contenido' => 7, 'cco_fila' => 8, 'cco_columna' => 9, 'cco_orden' => 10, 'cco_tipo' => 11, 'cco_clase_css' => 12, 'cco_disposicion_nombre' => 13, 'cco_estado' => 14, 'cco_eliminado' => 15, 'created_at' => 16, 'updated_at' => 17, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
); );
/** /**
...@@ -215,6 +221,8 @@ abstract class BaseCampaniaContenidoPeer ...@@ -215,6 +221,8 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_COLUMNA); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_COLUMNA);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ORDEN); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ORDEN);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_TIPO); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_TIPO);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_CLASE_CSS);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ESTADO); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ESTADO);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ELIMINADO); $criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ELIMINADO);
$criteria->addSelectColumn(CampaniaContenidoPeer::CREATED_AT); $criteria->addSelectColumn(CampaniaContenidoPeer::CREATED_AT);
...@@ -232,6 +240,8 @@ abstract class BaseCampaniaContenidoPeer ...@@ -232,6 +240,8 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addSelectColumn($alias . '.cco_columna'); $criteria->addSelectColumn($alias . '.cco_columna');
$criteria->addSelectColumn($alias . '.cco_orden'); $criteria->addSelectColumn($alias . '.cco_orden');
$criteria->addSelectColumn($alias . '.cco_tipo'); $criteria->addSelectColumn($alias . '.cco_tipo');
$criteria->addSelectColumn($alias . '.cco_clase_css');
$criteria->addSelectColumn($alias . '.cco_disposicion_nombre');
$criteria->addSelectColumn($alias . '.cco_estado'); $criteria->addSelectColumn($alias . '.cco_estado');
$criteria->addSelectColumn($alias . '.cco_eliminado'); $criteria->addSelectColumn($alias . '.cco_eliminado');
$criteria->addSelectColumn($alias . '.created_at'); $criteria->addSelectColumn($alias . '.created_at');
......
...@@ -34,6 +34,8 @@ use AppBundle\Model\Seccion; ...@@ -34,6 +34,8 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery orderByCcoColumna($order = Criteria::ASC) Order by the cco_columna column * @method CampaniaContenidoQuery orderByCcoColumna($order = Criteria::ASC) Order by the cco_columna column
* @method CampaniaContenidoQuery orderByCcoOrden($order = Criteria::ASC) Order by the cco_orden column * @method CampaniaContenidoQuery orderByCcoOrden($order = Criteria::ASC) Order by the cco_orden column
* @method CampaniaContenidoQuery orderByCcoTipo($order = Criteria::ASC) Order by the cco_tipo column * @method CampaniaContenidoQuery orderByCcoTipo($order = Criteria::ASC) Order by the cco_tipo column
* @method CampaniaContenidoQuery orderByCcoClaseCss($order = Criteria::ASC) Order by the cco_clase_css column
* @method CampaniaContenidoQuery orderByCcoDisposicionNombre($order = Criteria::ASC) Order by the cco_disposicion_nombre column
* @method CampaniaContenidoQuery orderByCcoEstado($order = Criteria::ASC) Order by the cco_estado column * @method CampaniaContenidoQuery orderByCcoEstado($order = Criteria::ASC) Order by the cco_estado column
* @method CampaniaContenidoQuery orderByCcoEliminado($order = Criteria::ASC) Order by the cco_eliminado column * @method CampaniaContenidoQuery orderByCcoEliminado($order = Criteria::ASC) Order by the cco_eliminado column
* @method CampaniaContenidoQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method CampaniaContenidoQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
...@@ -51,6 +53,8 @@ use AppBundle\Model\Seccion; ...@@ -51,6 +53,8 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery groupByCcoColumna() Group by the cco_columna column * @method CampaniaContenidoQuery groupByCcoColumna() Group by the cco_columna column
* @method CampaniaContenidoQuery groupByCcoOrden() Group by the cco_orden column * @method CampaniaContenidoQuery groupByCcoOrden() Group by the cco_orden column
* @method CampaniaContenidoQuery groupByCcoTipo() Group by the cco_tipo column * @method CampaniaContenidoQuery groupByCcoTipo() Group by the cco_tipo column
* @method CampaniaContenidoQuery groupByCcoClaseCss() Group by the cco_clase_css column
* @method CampaniaContenidoQuery groupByCcoDisposicionNombre() Group by the cco_disposicion_nombre column
* @method CampaniaContenidoQuery groupByCcoEstado() Group by the cco_estado column * @method CampaniaContenidoQuery groupByCcoEstado() Group by the cco_estado column
* @method CampaniaContenidoQuery groupByCcoEliminado() Group by the cco_eliminado column * @method CampaniaContenidoQuery groupByCcoEliminado() Group by the cco_eliminado column
* @method CampaniaContenidoQuery groupByCreatedAt() Group by the created_at column * @method CampaniaContenidoQuery groupByCreatedAt() Group by the created_at column
...@@ -94,6 +98,8 @@ use AppBundle\Model\Seccion; ...@@ -94,6 +98,8 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenido findOneByCcoColumna(int $cco_columna) Return the first CampaniaContenido filtered by the cco_columna column * @method CampaniaContenido findOneByCcoColumna(int $cco_columna) Return the first CampaniaContenido filtered by the cco_columna column
* @method CampaniaContenido findOneByCcoOrden(int $cco_orden) Return the first CampaniaContenido filtered by the cco_orden column * @method CampaniaContenido findOneByCcoOrden(int $cco_orden) Return the first CampaniaContenido filtered by the cco_orden column
* @method CampaniaContenido findOneByCcoTipo(int $cco_tipo) Return the first CampaniaContenido filtered by the cco_tipo column * @method CampaniaContenido findOneByCcoTipo(int $cco_tipo) Return the first CampaniaContenido filtered by the cco_tipo column
* @method CampaniaContenido findOneByCcoClaseCss(string $cco_clase_css) Return the first CampaniaContenido filtered by the cco_clase_css column
* @method CampaniaContenido findOneByCcoDisposicionNombre(string $cco_disposicion_nombre) Return the first CampaniaContenido filtered by the cco_disposicion_nombre column
* @method CampaniaContenido findOneByCcoEstado(int $cco_estado) Return the first CampaniaContenido filtered by the cco_estado column * @method CampaniaContenido findOneByCcoEstado(int $cco_estado) Return the first CampaniaContenido filtered by the cco_estado column
* @method CampaniaContenido findOneByCcoEliminado(int $cco_eliminado) Return the first CampaniaContenido filtered by the cco_eliminado column * @method CampaniaContenido findOneByCcoEliminado(int $cco_eliminado) Return the first CampaniaContenido filtered by the cco_eliminado column
* @method CampaniaContenido findOneByCreatedAt(string $created_at) Return the first CampaniaContenido filtered by the created_at column * @method CampaniaContenido findOneByCreatedAt(string $created_at) Return the first CampaniaContenido filtered by the created_at column
...@@ -111,6 +117,8 @@ use AppBundle\Model\Seccion; ...@@ -111,6 +117,8 @@ use AppBundle\Model\Seccion;
* @method array findByCcoColumna(int $cco_columna) Return CampaniaContenido objects filtered by the cco_columna column * @method array findByCcoColumna(int $cco_columna) Return CampaniaContenido objects filtered by the cco_columna column
* @method array findByCcoOrden(int $cco_orden) Return CampaniaContenido objects filtered by the cco_orden column * @method array findByCcoOrden(int $cco_orden) Return CampaniaContenido objects filtered by the cco_orden column
* @method array findByCcoTipo(int $cco_tipo) Return CampaniaContenido objects filtered by the cco_tipo column * @method array findByCcoTipo(int $cco_tipo) Return CampaniaContenido objects filtered by the cco_tipo column
* @method array findByCcoClaseCss(string $cco_clase_css) Return CampaniaContenido objects filtered by the cco_clase_css column
* @method array findByCcoDisposicionNombre(string $cco_disposicion_nombre) Return CampaniaContenido objects filtered by the cco_disposicion_nombre column
* @method array findByCcoEstado(int $cco_estado) Return CampaniaContenido objects filtered by the cco_estado column * @method array findByCcoEstado(int $cco_estado) Return CampaniaContenido objects filtered by the cco_estado column
* @method array findByCcoEliminado(int $cco_eliminado) Return CampaniaContenido objects filtered by the cco_eliminado column * @method array findByCcoEliminado(int $cco_eliminado) Return CampaniaContenido objects filtered by the cco_eliminado column
* @method array findByCreatedAt(string $created_at) Return CampaniaContenido objects filtered by the created_at column * @method array findByCreatedAt(string $created_at) Return CampaniaContenido objects filtered by the created_at column
...@@ -220,7 +228,7 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria ...@@ -220,7 +228,7 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT `cco_id`, `cam_id`, `dis_id`, `dco_id`, `sec_id`, `fil_id`, `cco_entorno`, `cco_contenido`, `cco_fila`, `cco_columna`, `cco_orden`, `cco_tipo`, `cco_estado`, `cco_eliminado`, `created_at`, `updated_at` FROM `campania_contenido` WHERE `cco_id` = :p0'; $sql = 'SELECT `cco_id`, `cam_id`, `dis_id`, `dco_id`, `sec_id`, `fil_id`, `cco_entorno`, `cco_contenido`, `cco_fila`, `cco_columna`, `cco_orden`, `cco_tipo`, `cco_clase_css`, `cco_disposicion_nombre`, `cco_estado`, `cco_eliminado`, `created_at`, `updated_at` FROM `campania_contenido` WHERE `cco_id` = :p0';
try { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
...@@ -810,6 +818,64 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria ...@@ -810,6 +818,64 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
return $this->addUsingAlias(CampaniaContenidoPeer::CCO_TIPO, $ccoTipo, $comparison); return $this->addUsingAlias(CampaniaContenidoPeer::CCO_TIPO, $ccoTipo, $comparison);
} }
/**
* Filter the query on the cco_clase_css column
*
* Example usage:
* <code>
* $query->filterByCcoClaseCss('fooValue'); // WHERE cco_clase_css = 'fooValue'
* $query->filterByCcoClaseCss('%fooValue%'); // WHERE cco_clase_css LIKE '%fooValue%'
* </code>
*
* @param string $ccoClaseCss The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CampaniaContenidoQuery The current query, for fluid interface
*/
public function filterByCcoClaseCss($ccoClaseCss = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($ccoClaseCss)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $ccoClaseCss)) {
$ccoClaseCss = str_replace('*', '%', $ccoClaseCss);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CampaniaContenidoPeer::CCO_CLASE_CSS, $ccoClaseCss, $comparison);
}
/**
* Filter the query on the cco_disposicion_nombre column
*
* Example usage:
* <code>
* $query->filterByCcoDisposicionNombre('fooValue'); // WHERE cco_disposicion_nombre = 'fooValue'
* $query->filterByCcoDisposicionNombre('%fooValue%'); // WHERE cco_disposicion_nombre LIKE '%fooValue%'
* </code>
*
* @param string $ccoDisposicionNombre The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CampaniaContenidoQuery The current query, for fluid interface
*/
public function filterByCcoDisposicionNombre($ccoDisposicionNombre = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($ccoDisposicionNombre)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $ccoDisposicionNombre)) {
$ccoDisposicionNombre = str_replace('*', '%', $ccoDisposicionNombre);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CampaniaContenidoPeer::CCO_DISPOSICION_NOMBRE, $ccoDisposicionNombre, $comparison);
}
/** /**
* Filter the query on the cco_estado column * Filter the query on the cco_estado column
* *
......
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
<column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/> <column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/>
<column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/> <column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/>
<column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/> <column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/>
<column name="cco_clase_css" phpName="CcoClaseCss" type="VARCHAR" size="255" required="false"/>
<column name="cco_disposicion_nombre" phpName="CcoDisposicionNombre" type="VARCHAR" size="255" required="false"/>
<column name="cco_estado" phpName="CcoEstado" type="INTEGER" required="false"/> <column name="cco_estado" phpName="CcoEstado" type="INTEGER" required="false"/>
<column name="cco_eliminado" phpName="CcoEliminado" type="INTEGER" required="false"/> <column name="cco_eliminado" phpName="CcoEliminado" type="INTEGER" required="false"/>
<behavior name="timestampable" /> <behavior name="timestampable" />
......
...@@ -23,6 +23,7 @@ use AppBundle\Model\CampaniaContenido; ...@@ -23,6 +23,7 @@ use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\CampaniaContenidoQuery; use AppBundle\Model\CampaniaContenidoQuery;
use AppBundle\Model\Template; use AppBundle\Model\Template;
use AppBundle\Model\TemplateQuery; use AppBundle\Model\TemplateQuery;
use AppBundle\Model\TemplateCssRelacionQuery;
class CampaniaController extends Controller { class CampaniaController extends Controller {
...@@ -416,7 +417,7 @@ class CampaniaController extends Controller { ...@@ -416,7 +417,7 @@ class CampaniaController extends Controller {
} }
$campania = CampaniaQuery::create()->findPk($campaniaId);
$fila = FilaQuery::create()->findPk($filaId); $fila = FilaQuery::create()->findPk($filaId);
$log->debug("generando contenido nuevo asociado a la camapaña $campaniaId..."); $log->debug("generando contenido nuevo asociado a la camapaña $campaniaId...");
$contenidoCampania = CampaniaContenidoQuery::create()->filterByCcoId($contenidoId)->filterByCamId($campaniaId)->findOne(); $contenidoCampania = CampaniaContenidoQuery::create()->filterByCcoId($contenidoId)->filterByCamId($campaniaId)->findOne();
...@@ -431,6 +432,9 @@ class CampaniaController extends Controller { ...@@ -431,6 +432,9 @@ class CampaniaController extends Controller {
$contenidoCampania->setCcoOrden(1); $contenidoCampania->setCcoOrden(1);
$contenidoCampania->setCcoTipo($tipo); $contenidoCampania->setCcoTipo($tipo);
$contenidoCampania->setCcoEntorno($entorno); $contenidoCampania->setCcoEntorno($entorno);
$contenidoCampania->setCcoClaseCss(TemplateCssRelacionQuery::getCss($contenidoCampania, $campania));
$contenidoCampania->setCcoDisposicionNombre(DisposicionColumnasQuery::getNombreDisposicion($contenidoCampania));
$contenidoCampania->save(); $contenidoCampania->save();
$this->correccionDisposicionColumnas($campaniaId, $filaId, $disposicionId); $this->correccionDisposicionColumnas($campaniaId, $filaId, $disposicionId);
...@@ -503,7 +507,7 @@ class CampaniaController extends Controller { ...@@ -503,7 +507,7 @@ class CampaniaController extends Controller {
} }
$campania = CampaniaQuery::create()->findPk($campaniaId);
$fila = FilaQuery::create()->findPk($filaId); $fila = FilaQuery::create()->findPk($filaId);
$log->debug("generando contenido nuevo asociado a la camapaña $campaniaId..."); $log->debug("generando contenido nuevo asociado a la camapaña $campaniaId...");
$contenidoCampania = new CampaniaContenido(); $contenidoCampania = new CampaniaContenido();
...@@ -518,6 +522,8 @@ class CampaniaController extends Controller { ...@@ -518,6 +522,8 @@ class CampaniaController extends Controller {
$contenidoCampania->setCcoOrden(1); $contenidoCampania->setCcoOrden(1);
$contenidoCampania->setCcoTipo($tipo); $contenidoCampania->setCcoTipo($tipo);
$contenidoCampania->setCcoEntorno($entorno); $contenidoCampania->setCcoEntorno($entorno);
$contenidoCampania->setCcoClaseCss(TemplateCssRelacionQuery::getCss($contenidoCampania, $campania));
$contenidoCampania->setCcoDisposicionNombre(DisposicionColumnasQuery::getNombreDisposicion($contenidoCampania));
$contenidoCampania->setCcoEstado(CampaniaContenido::ESTADO_ACTIVO); $contenidoCampania->setCcoEstado(CampaniaContenido::ESTADO_ACTIVO);
$contenidoCampania->setCcoEliminado(CampaniaContenido::ELIMINADO_FALSE); $contenidoCampania->setCcoEliminado(CampaniaContenido::ELIMINADO_FALSE);
$contenidoCampania->save(); $contenidoCampania->save();
...@@ -559,7 +565,7 @@ class CampaniaController extends Controller { ...@@ -559,7 +565,7 @@ class CampaniaController extends Controller {
$disposicionesColumnasFilas = DisposicionColumnasQuery::create()->filterByDcoEstado(DisposicionColumnas::ACTIVO_TRUE)->filterByDcoEliminado(DisposicionColumnas::ACTIVO_FALSE)->find(); $disposicionesColumnasFilas = DisposicionColumnasQuery::create()->filterByDcoEstado(DisposicionColumnas::ACTIVO_TRUE)->filterByDcoEliminado(DisposicionColumnas::ACTIVO_FALSE)->find();
$filas = FilaQuery::create()->filterByFilEstado(Fila::ACTIVO_TRUE)->filterByFilEliminado(Fila::ELIMINADO_FALSE)->filterBySecId($contenido->getSecId())->filterByCamId($camId)->find(); $filas = FilaQuery::create()->filterByFilEstado(Fila::ACTIVO_TRUE)->filterByFilEliminado(Fila::ELIMINADO_FALSE)->filterBySecId($contenido->getSecId())->filterByCamId($camId)->find();
if ($contenido->getCcoTipo() == CampaniaContenido::TIPO_VIDEO) { if ($contenido->getSecId() == CampaniaContenido::SECCION_HEAD) {
$tipos = TipoQuery::create()->filterByTipEstado(Tipo::ACTIVO_TRUE)->filterByTipEliminado(Tipo::ELIMINADO_FALSE)->filterByTipId(array(Tipo::TIPO_VIDEO), \Criteria::NOT_IN)->find(); $tipos = TipoQuery::create()->filterByTipEstado(Tipo::ACTIVO_TRUE)->filterByTipEliminado(Tipo::ELIMINADO_FALSE)->filterByTipId(array(Tipo::TIPO_VIDEO), \Criteria::NOT_IN)->find();
} else { } else {
$tipos = TipoQuery::create()->filterByTipEstado(Tipo::ACTIVO_TRUE)->filterByTipEliminado(Tipo::ELIMINADO_FALSE)->find(); $tipos = TipoQuery::create()->filterByTipEstado(Tipo::ACTIVO_TRUE)->filterByTipEliminado(Tipo::ELIMINADO_FALSE)->find();
......
campania_listado:
path: /listado/campanias
defaults: {_controller: CampaniaBundle:Campania:listadoCampanias}
campania_generando_nueva_campania:
path: /generando/nueva/campania
defaults: {_controller: CampaniaBundle:Campania:generandoNuevaCampania}
campania_crear:
path: /nueva/{camId}
defaults: { _controller: CampaniaBundle:Campania:nuevaCampania, camId : none}
requirements:
camId: '\d+'
campania_eliminar:
path: /eliminar/{camId}
defaults: {_controller : CampaniaBundle:Campania:eliminarCampania, camId: none}
requirements:
camId: '\d+'
campania_eliminar_contenido:
path: /eliminar/contenido
defaults: {_controller: CampaniaBundle:Campania:eliminarContenido}
campania_crear_fila_seccion:
path: /crear/fila/seccion
defaults: { _controller: CampaniaBundle:Campania:generarNuevaFila}
campania_crear_fila_seccion_editar:
path: /crear/fila/seccion/editar
defaults: { _controller: CampaniaBundle:Campania:generarNuevaFilaEditar}
campania_recargar_fila_selector:
path: /recargar/fila/selector
defaults: { _controller: CampaniaBundle:Campania:reloadFilaSelector}
campania_recargar_columna_selector:
path: /recargar/columna/selector
defaults: { _controller: CampaniaBundle:Campania:reloadColumnaSelector}
campania_save_contenido:
path: /guardar/contenido/campania
defaults: { _controller: CampaniaBundle:Campania:saveContenido}
campania_actualizar_con_contenido:
path: /actualizar/campania
defaults: { _controller: CampaniaBundle:Campania:actualizarCampania}
campania_cargar_datos_contenido:
path: /cargar/datos/contenido/campania
defaults: {_controller: CampaniaBundle:Campania:loadDataContenido}
campania_update_contenido:
path: /actualizar/contenido/campania
defaults: { _controller: CampaniaBundle:Campania:updateContenido}
\ No newline at end of file
...@@ -3,13 +3,9 @@ ...@@ -3,13 +3,9 @@
namespace WsBundle\Controller\v1; namespace WsBundle\Controller\v1;
use WsBundle\Controller\ApiController; use WsBundle\Controller\ApiController;
use JMS\Serializer\Exception\RuntimeException;
use Nelmio\ApiDocBundle\Annotation\ApiDoc; use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use FOS\RestBundle\Controller\Annotations\View as RestView;
use FOS\RestBundle\View\View; use FOS\RestBundle\View\View;
use WsBundle\Controller\v1\serializer\szerCampania; use WsBundle\Controller\v1\serializer\szerCampania;
use WsBundle\Controller\v1\serializer\szerHeadContenido; use WsBundle\Controller\v1\serializer\szerHeadContenido;
...@@ -19,12 +15,9 @@ use WsBundle\Controller\v1\serializer\szerHtmlContenido; ...@@ -19,12 +15,9 @@ use WsBundle\Controller\v1\serializer\szerHtmlContenido;
use AppBundle\Lib\Utiles; use AppBundle\Lib\Utiles;
use AppBundle\Lib\Responses; use AppBundle\Lib\Responses;
use AppBundle\Model\Disposicion; use AppBundle\Model\Disposicion;
use AppBundle\Model\DisposicionQuery;
use AppBundle\Model\Campania;
use AppBundle\Model\CampaniaQuery; use AppBundle\Model\CampaniaQuery;
use AppBundle\Model\CampaniaContenido; use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\CampaniaContenidoQuery; use AppBundle\Model\CampaniaContenidoQuery;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionQuery; use AppBundle\Model\TemplateCssRelacionQuery;
class CampaniaApiController extends ApiController { class CampaniaApiController extends ApiController {
...@@ -56,12 +49,7 @@ class CampaniaApiController extends ApiController { ...@@ -56,12 +49,7 @@ class CampaniaApiController extends ApiController {
public function obtenerContenidoAction(Request $request) { public function obtenerContenidoAction(Request $request) {
$log = Utiles::setLog('CampaniaBundle\Controller\CampaniaController:obtenerContenidoAction', 'mcafee/ws/index'); $log = Utiles::setLog('CampaniaBundle\Controller\CampaniaController:obtenerContenidoAction', 'mcafee/ws/index');
$tiempo_inicio = microtime(true); $tiempo_inicio = microtime(true);
$arrayHeadContenido = array();
$arrayBodyContenido = array();
$arrayFooterContenido = array();
$esMovil = false; $esMovil = false;
$html = "";
$indice = 0;
$log->debug("analizando serializer de entrada szerCampania..."); $log->debug("analizando serializer de entrada szerCampania...");
$szerValidatorCampania = $this->deserialize('WsBundle\Controller\v1\serializer\szerCampania', $request); $szerValidatorCampania = $this->deserialize('WsBundle\Controller\v1\serializer\szerCampania', $request);
if ($szerValidatorCampania instanceof szerCampania === false) { if ($szerValidatorCampania instanceof szerCampania === false) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment