Skip to main content

Home/ foograde/ Contents contributed and discussions participated by Fernando Vega

Contents contributed and discussions participated by Fernando Vega

Fernando Vega

Establecer filtros en accion de forma manual, $this->setFilters() - 1 views

started by Fernando Vega on 17 Feb 11 no follow-up yet
  • Fernando Vega
     
    Si se recibe un parametro por get desde una acción o metodo se puede establecer el filtro simplemente mandando una array con el nombre del campo y el valor a establecer.

    if($this->getRequestParameter('album_id'))
    $this->setFilters(array('album_id'=> $this->getRequestParameter('album_id')));
Fernando Vega

Crear minuaturas por medio de una ruta - 1 views

started by Fernando Vega on 20 Oct 10 no follow-up yet
  • Fernando Vega
     
    public function configure()
    {
    $file_src = sfContext::getInstance()->getController()->genUrl(array(
    'sf_route' => 'sf_image',
    'format' => 'backend_edit',
    'filepath' => '/barfoo/'.$this->getObject()->file
    ), false);
    $this->widgetSchema['file'] = new sfWidgetFormInputFileEditable(array(
    'label' => 'Image',
    'is_image' => true,
    'file_src' => $file_src
    ));
    $this->validatorSchema['file'] = new sfValidatorFile(array(
    'required' => false,
1 - 2 of 2
Showing 20 items per page