Skip to main content

Home/ foograde/ Group items tagged symfony

Rss Feed Group items tagged

federico balderas

Symfony - Delete and reload all database records for each test - Stack Overflow - 0 views

  •  
    "$doctrine = new sfDoctrineDropDbTask($configuration->getEventDispatcher(), new sfAnsiColorFormatter()); $doctrine->run(array(), array("--no-confirmation","--env=test")); $doctrine = new sfDoctrineBuildDbTask($configuration->getEventDispatcher(), new sfAnsiColorFormatter()); $doctrine->run(array(), array("--env=test")); $doctrine = new sfDoctrineInsertSqlTask($configuration->getEventDispatcher(), new sfAnsiColorFormatter()); $doctrine->run(array(), array("--env=test"));"
Fernando Vega

symfony framework forum: symfony 1.3 and 1.4 => is there anyone can tell me how to use ... - 0 views

  • in the form $this->widgetSchema['login_id'] = new sfWidgetFormJQueryAutocompleter(array( 'url' => '/ajax/getUser', )); and in the action of executeGetUser $this->getResponse()->setContentType('application/json'); $users=Doctrine::getTable('user')->getLoginIDList(); return $this->renderText(json_encode($users)); And in the userTable which inside Doctrine $q=Doctrine_Query::create()->select('login_id')->from('user')- >execute(); foreach($q as $row){ $login_id[$row->login_id]=$row->login_id; } return $login_id; hope this help =]
    • Fernando Vega
       
      autocompletar con doctrine y sf 1.4
Fernando Vega

The Definitive Guide to symfony | Chapter 9 - Links And The Routing System | symfony | ... - 0 views

  • prod: .settings no_script_name: off
    • Fernando Vega
       
      para eliminar el nombre del controlador en lo enlaces
Adán Muguiro

Symfony world: Custom admin generator filter example - 0 views

  •  
    Aplicar filtros de admin generator personalizados
Adán Muguiro

Reteniendo el nombre original del archivo al subirse. - 0 views

  •  
    El sfValidatorFile modifica el nombre del archivo a un hash de números locos, si no queremos esto y conservar el nombre del archivo se puede leer esto.
Adán Muguiro

Modificar template de los widgets - 0 views

  • $this->getWidgetSchema()->getFormFormatter()->setRowFormat('<div >%field%%help%%error%%hidden_fields%</div>');
  •  
    En caso de no querer poner los labels o cualquier otro componente de un widget por default.
Adán Muguiro

sfWidgetFormPropelChoice y el valor seleccionado - 0 views

  • in BaseFormPropel i have the function : public function setValue($field,$value){ $this->widgetSchema[$field]->setDefault ($value); } and in my action : $this->form->setValue('idtype_doc',$this->getUser()->getAttribute('dossier_rec[type_doc]'));
  •  
    Cómo modificar el valor seleccionado dentro de un select de propel o cualquier otro.
Adán Muguiro

Personalización de formularios - 0 views

  • $ws = new sfWidgetFormSchema(array('name' => new sfWidgetFormInput()));   $ws->setDefault('name', 'Fabien');   // which is equivalent to   $ws['name']->setDefault('Fabien');   // or   $ws->setDefaults(array('name' => 'Fabien'));
  •  
    Modificando los labels y demás
Adán Muguiro

Incluir formularo i18n en un modelo - 1 views

  • public function configure() { unset( $this['jobeet_affiliates_list'], $this['created_at'], $this['updated_at'] );   $this->embedI18n(array('en', 'fr')); $this->widgetSchema->setLabel('en', 'English'); $this->widgetSchema->setLabel('fr', 'French'); }
  •  
    Codigo a pegar en el TablaForm de cierto modelo
Adán Muguiro

Campos i18n en Admin Generator - 0 views

  • //generator.yml form: display: Espanol: [es] Italiano: [it] fijos: [forma_pago, moneda_code]
  •  
    Agregar campos i18n en una personalización del Admin Generator de una tabla
Fernando Vega

Comparing route to current request in Symfony - Stack Overflow - 0 views

  • sfContext::getInstance()->getRouting()->getCurrentRouteName();
    • Fernando Vega
       
      nombre de la ruta
Fernando Vega

Alternativo layout por accion - 0 views

  • Just use $this->setLayout('popup') in your action or use in the view.yml of your module: actionSuccess: layout: popup
  •  
    layout diferentes por accion, util para peticiones de ajax por iframes
Adán Muguiro

sfWidgetFormJQueryAutocompleter - 2 views

  •  
    Utilizando el widget de autocompletado
Adán Muguiro

Modificando los widgets en la acción - 0 views

  • // in modules/foo/actions/actions.class.php // Define the form $this->form = new ContactForm();   // Add an empty option to the list of choices of a 'choice' widget $form->getWidget('language')->setOption('add_empty', 'Please choose a language'); // Add a 'gender' list of options widget $form->setWidget('gender', new sfWidgetFormChoice(array('expanded' => true, 'choices' => array('m' => 'Male', 'f' => 'Female')), array('class' => 'gender_list'))); // Change the HTML attributes of the 'subject' widget $form->getWidget('subject')->setAttribute('disabled', 'disabled'); // Remove the 'subject' field unset($form['subject']) // Note: You cannot remove just the widget. Removing a widget will also remove the related validators   // Change the 'min_length' error in the 'message' validator $form->getValidator('message')->setMessage('min_length', 'Message too short'); // Make the 'name' field optional $form->getValidator('name')->setOption('required', false);
  •  
    Varias cosas que se pueden modificar en los widgets desde la acción.
Adán Muguiro

Widgets para fechas con i18n - 0 views

  • $w = new sfWidgetFormI18nDate(array( 'culture' => 'fr', 'month_format' => 'short_name', ));
  •  
    Para poner los meses abreviados con la nomenclatura en español
Fernando Vega

Uploaded docx files turning into zip - Stack Overflow - 0 views

  • $this->validatorSchema['file_name'] = new sfValidatorFile(array('required'   => true,'path'       => sfConfig::get('sf_upload_dir').DIRECTORY_SEPARATOR.sfConfig::get('app_dir_file_sharing').DIRECTORY_SEPARATOR,'mime_type_guessers' => array('guessFromFileinfo'),'mime_types' => array('application/msword',                    'application/vnd.ms-word',                    'application/msword',                    'application/msword; charset=binary')), array(    'invalid'    => 'Invalid file.',    'required'   => 'Select a file to upload.',    'mime_types' => 'The file must be a supported type.'));
    • Fernando Vega
       
      Subir y validar archivos en formato word 2007 en symfony
Adán Muguiro

Ordenamiento en columnas personalizadas en admin generator - 0 views

  •  
    Cabeceras ordenables en cualquier columna
‹ Previous 21 - 40 of 40
Showing 20 items per page