Skip to main content

Home/ foograde/ Group items tagged symfony

Rss Feed Group items tagged

Adán Muguiro

Symfony world: session timeout in symfony 1.3, 1.4 - 1 views

  •  
    Incrementar tiempo de sesión en symfony
Adán Muguiro

Easy Ajax in symfony | symfony | Web PHP Framework - 0 views

  • <?php foreach ($sf_user->getAttribute('cart') as $product_id => $quantity): ?> <div> <?php for ($i = 1; $i <= $quantity; $i++): ?> <?php echo image_tag('product'.$product_id, array( 'class' => 'cart-items', 'id' => 'item_'.$product_id.'_'.$i, 'style' => 'position:relative' )) ?> <?php endfor; ?> (<?php echo $quantity ?> <?php echo $products[$product_id] ?>) </div> <?php endforeach; ?>   <?php if (!$sf_user->getAttribute('cart')): ?> nothing yet in your shopping cart. <?php endif; ?>
  • public function executeAdd() { $tmp = split('_', $this->getRequestParameter('id', '')); $product_id = $tmp[1];   $cart = $this->getUser()->getAttribute('cart'); if (!isset($cart[$product_id])) { $cart[$product_id] = 1; } else { ++$cart[$product_id]; } $this->getUser()->setAttribute('cart', $cart); $this->products = $this->getProducts(); }
  •  
    Variables de usuario e imágenes en Symfony
Adán Muguiro

Configuración de Apache para un sitio con Symfony - 2 views

  • NameVirtualHost 127.0.0.1:8080 # This is the configuration for your project Listen 127.0.0.1:8080 <VirtualHost 127.0.0.1:8080> DocumentRoot "/home/sfproject/web" DirectoryIndex index.php <Directory "/home/sfproject/web"> AllowOverride All Allow from All </Directory> Alias /sf /home/sfproject/lib/vendor/symfony/data/web/sf <Directory "/home/sfproject/lib/vendor/symfony/data/web/sf"> AllowOverride All Allow from All </Directory> </VirtualHost>
  •  
    Lo que debería ir en /etc/apache2/httpd.conf
Fernando Vega

Todas las presentaciones de las Jornadas Symfony - 1 views

  •  
    Ultimas presentaciones de las jornadas de symfony
Adán Muguiro

Chuletas (cheat sheet) para Symfony | Symfony.es - 0 views

  •  
    Las chuletas con Symfony
Adán Muguiro

The Definitive Guide to symfony | Chapter 7 - Inside The View Layer | symfony | Web PHP... - 0 views

  • <?php   class newsComponents extends sfComponents { public function executeHeadlines() { $c = new Criteria(); $c->addDescendingOrderByColumn(NewsPeer::PUBLISHED_AT); $c->setLimit(5); $this->news = NewsPeer::doSelect($c); } }
  • <div> <h1>Latest news</h1> <ul> <?php foreach($news as $headline): ?> <li> <?php echo $headline->getPublishedAt() ?> <?php echo link_to($headline->getTitle(),'news/show?id='.$headline->getId()) ?> </li> <?php endforeach ?> </ul> </div>
  • // Call to the component <?php include_component('news', 'headlines', array('foo' => 'bar')) ?>   // In the component itself echo $this->foo; => 'bar'   // In the _headlines.php partial echo $foo; => 'bar'
  •  
    Componentes en Symfony
Adán Muguiro

Symfony world: symfony range filter - 0 views

  •  
    Implementar filtro de rangos en filtrado de generators
Adán Muguiro

Email y Symfony 1.4 - 0 views

  • $message = $this->getMailer()->compose( array('jobeet@example.com' => 'Jobeet Bot'), $affiliate->getEmail(), 'Jobeet affiliate token', <<<EOF Your Jobeet affiliate account has been activated.   Your token is {$affiliate->getToken()}.   The Jobeet Bot. EOF );   $this->getMailer()->send($message);
  •  
    Enviando un email simple con Symfony 1.4
Adán Muguiro

Practical symfony | Día 3: El Modelo De Datos | symfony | Web PHP Framework - 0 views

  • php symfony doctrine:generate-module --with-show --non-verbose-templates frontend job JobeetJob
  •  
    Generando un módulo basado en una clase de Doctrine
Adán Muguiro

jq_input_auto_complete_tag - 1 views

  • <?php echo jq_input_auto_complete_tag('servicio''','servicios/ buscarServicio',array('class'=>'fs11'),array('use_style'=> true,'autocomplete' =>...)) ?> En la acción, el parámentro no se recoge mediante "$request- >getParameter('servicio')" sino mediante "$request->getParameter ('q')".
  •  
    Autocompletado con AJAX y Symfony
  •  
    Autocompletado con AJAX y Symfony 1.4
Adán Muguiro

La Chuleta de los Generadores - 1 views

  •  
    Resumen de todas las configuraciones disponibles dentro de los generadores de Symfony
Adán Muguiro

Formularios personalizados - 0 views

  • <?php echo $form->renderFormTag('foo/contact') ?> <table> <?php echo $form['name']->renderRow() ?> <?php echo $form['email']->renderRow() ?> <?php echo $form['subject']->renderRow() ?> <?php echo $form['message']->renderRow() ?> <tr> <td colspan="2"> <input type="submit" /> </td> </tr> </table> </form>
  •  
    Separando los componentes de un formulario hecho con widgets en Symfony
Adán Muguiro

The Definitive Guide to symfony | Chapter 11 - Ajax Integration | symfony | Web PHP Fra... - 0 views

  • <div id="item_list"></div> <?php echo form_tag('@item_add_regular') ?> <label for="item">Item:</label> <?php echo input_tag('item') ?> <?php if_javascript(); ?> <?php echo submit_to_remote('ajax_submit', 'Add in Ajax', array( 'update' => 'item_list', 'url' => '@item_add', )) ?> <?php end_if_javascript(); ?> <noscript> <?php echo submit_tag('Add') ?> </noscript> </form>
  • <div id="feedback"></div> <div id="indicator" style="display: none">Loading...</div> <?php echo link_to_remote('Delete this post', array( 'update' => 'feedback', 'url' => 'post/delete?id='.$post->getId(), 'loading' => visual_effect('appear', 'indicator'), 'complete' => visual_effect('fade', 'indicator'). visual_effect('highlight', 'feedback'), )) ?>
  • <div id="feedback"></div> <div id="indicator">Loading...</div> <?php echo link_to_remote('Delete this post', array( 'update' => 'feedback', 'url' => 'post/delete?id='.$post->getId(), 'loading' => "Element.show('indicator')", 'complete' => "Element.hide('indicator')", )) ?>
  •  
    Formulario que funciona con Ajax o no
Adán Muguiro

The Definitive Guide to symfony | Chapter 8 - Inside The Model Layer | symfony | Web PH... - 0 views

  • SQL Criteria WHERE column = value ->add(column, value); WHERE column <> value ->add(column, value, Criteria::NOT_EQUAL); Other Comparison Operators > , < Criteria::GREATER_THAN, Criteria::LESS_THAN >=, <= Criteria::GREATER_EQUAL, Criteria::LESS_EQUAL IS NULL, IS NOT NULL Criteria::ISNULL, Criteria::ISNOTNULL LIKE, ILIKE Criteria::LIKE, Criteria::ILIKE IN, NOT IN Criteria::IN, Criteria::NOT_IN Other SQL Keywords ORDER BY column ASC ->addAscendingOrderByColumn(column); ORDER BY column DESC ->addDescendingOrderByColumn(column); LIMIT limit ->setLimit(limit) OFFSET offset ->setOffset(offset) FROM table1, table2 WHERE table1.col1 = table2.col2 ->addJoin(col1, col2) FROM table1 LEFT JOIN table2 ON table1.col1 = table2.col2 ->addJoin(col1, col2, Criteria::LEFT_JOIN) FROM table1 RIGHT JOIN table2 ON table1.col1 = table2.col2 ->addJoin(col1, col2, Criteria::RIGHT_JOIN)
  •  
    Sentencias SQL y sus equivalentes con Criteria
Fernando Vega

symfony framework forum: symfony 1.3 and 1.4 => Admin generator, filters and I18n - 1 views

  •  
    "class MenuFormFilter extends BaseMenuFormFilter { private $rootAlias; public function configure() { $this->widgetSchema['title'] = new sfWidgetFormFilterInput(array('with_empty' => false)); $this->validatorSchema['title'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['type'] = new sfWidgetFormChoice(array( 'choices' => Doctrine_Core::getTable('Menu')->getTypes(), 'expanded' => false, )); $this->validatorSchema['type'] = new sfValidatorChoice(array( 'choices' => array_keys(Doctrine_Core::getTable('Menu')->getTypes()), )); } public function addTitleColumnQuery(Doctrine_Query $q, $field, $values) { if (is_array($values) && isset($values['text']) && '' != $values['text']) { $this->JoinTable($q); $q->andWhere('t.title like ?', '%' . str_replace(" ","%",$values['text']) . '%'); } } public function addTypeColumnQuery(Doctrine_Query $q, $field, $values){ if (isset($values) && '%' != $values) { $this->JoinTable($q); $q->andWhere('t.type = ?', $values); } } private function JoinTable(Doctrine_Query $q){ if(empty($this->rootAlias)){ $request = sfContext::getInstance()->getRequest(); $this->rootAlias = $q->getRootAlias(); $q->leftJoin($this->rootAlias.'.Translation t') ->andWhere('t.lang = ?', $request->getParameter('sf_culture', 'ro')); // or it will search in all of them } } public function getFields(){ return parent::getFields() + array('type' => 'Text') + array('title' => 'Text'); } } "
Adán Muguiro

SAKRA WebStudio: Remove PostValidator in Symfony - 0 views

  •  
    quitar un post validator definido en una clase base
Adán Muguiro

Love Coding: Diem, Symfony - Set value for Form field in processForm - 0 views

  •  
    Setteando campos manualmente durante el processForm
federico balderas

Symfony - Doctrine - Saving Many-To-Many (M:M) relationships | Me Like Dev - 0 views

  •  
    "01 Author: 02 tableName: author 03 columns: 04 ... 05 relations: 06 Book: 07 class: Book 08 refClass: LinkingAuthorBook #This will allow you to reference Book rows from an Author object 09 local: author_id #Local value refers to the current object, in this case Author 10 foreign: book_id #Foreign value refers to the object you wish to link to from Author, in this case Book 11 Book: 12 tableName: book 13 columns: 14 ... 15 relations: 16 Author: 17 class: Author 18 refClass: LinkingAuthorBook #This will allow you to reference Author rows from a Book object 19 local: book_id #Local value refers to the current object, in this case Author 20 foreign: author_id #Foreign value refers to the object you wish to link to from Book, in this case Author"
Adán Muguiro

La Guia Definitiva Symfony 1.4 - 2 views

  •  
    Por fin ha salido, aunque sea en inglés por lo pronto
Adán Muguiro

Embed Forms - 0 views

  •  
    Líneas de código para embeber un formulario dentro de otro donde existe una relación de clave foránea.
1 - 20 of 40 Next ›
Showing 20 items per page