Exemplo n.º 1
0
 public function executeNewtag(sfWebRequest $request)
 {
     $texto = $request->getParameter('texto', false);
     if ($texto) {
         $texto = trim($texto);
     }
     $id = $request->getParameter('entity', false);
     $type = $request->getParameter('type', false);
     switch ($type) {
         case Politico::NUM_ENTITY:
             $this->entity = PoliticoPeer::retrieveByPK($id);
             break;
         case Partido::NUM_ENTITY:
             $this->entity = PartidoPeer::retrieveByPK($id);
             break;
         case Propuesta::NUM_ENTITY:
             $this->entity = PropuestaPeer::retrieveByPK($id);
             break;
     }
     if ($this->entity) {
         TagManager::newTag($this->entity, $texto);
     }
 }