Development

Changeset 12051

You must first sign up to be able to contribute.

Changeset 12051

Show
Ignore:
Timestamp:
10/07/08 20:09:15 (2 months ago)
Author:
Jonathan.Wage
Message:

[1.1, 1.2] sfDoctrinePlugin: Fixing lists to use Doctrine array access so they can be used with array hydration.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrinePlugin/branches/1.1/data/generator/sfDoctrineAdmin/crud/template/templates/listSuccess.php

    r5647 r12051  
    1414<?php foreach ($this->getColumns('') as $column): ?> 
    1515  <?php if ($column->isPrimaryKey()): ?> 
    16   <td>[?php echo link_to($<?php echo $this->getSingularName() ?>->get('<?php echo $column->getPhpName() ?>'), '<?php echo $this->getModuleName() ?>/show?<?php echo $this->getPrimaryKeyUrlParams() ?>); ?]</td> 
     16  <td>[?php echo link_to($<?php echo $this->getSingularName() ?>['<?php echo $column->getPhpName() ?>'], '<?php echo $this->getModuleName() ?>/show?<?php echo $this->getPrimaryKeyUrlParams() ?>); ?]</td> 
    1717  <?php else: ?> 
    18   <td>[?php echo $<?php echo $this->getSingularName() ?>->get('<?php echo $column->getPhpName() ?>'); ?]</td> 
     18  <td>[?php echo $<?php echo $this->getSingularName() ?>['<?php echo $column->getPhpName() ?>']; ?]</td> 
    1919  <?php endif; ?> 
    2020<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/branches/1.1/data/generator/sfDoctrineAdmin/crud/template/templates/showSuccess.php

    r5647 r12051  
    44<tr> 
    55<th><?php echo sfInflector::humanize(sfInflector::underscore($column->getPhpName())) ?>: </th> 
    6 <td>[?= $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</td> 
     6<td>[?= $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</td> 
    77</tr> 
    88<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/branches/1.1/data/generator/sfDoctrineCrud/default/template/templates/indexSuccess.php

    r11494 r12051  
    1515<?php foreach ($this->getAllColumns() as $column): ?> 
    1616<?php if ($column->isPrimaryKey()): ?> 
    17       <td><a href="[?php echo url_for('<?php echo $this->getModuleName() ?>/<?php echo isset($this->params['with_show']) && $this->params['with_show'] ? 'show' : 'edit' ?>?<?php echo $this->getPrimaryKeyUrlParams() ?>) ?]">[?php echo $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</a></td> 
     17      <td><a href="[?php echo url_for('<?php echo $this->getModuleName() ?>/<?php echo isset($this->params['with_show']) && $this->params['with_show'] ? 'show' : 'edit' ?>?<?php echo $this->getPrimaryKeyUrlParams() ?>) ?]">[?php echo $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</a></td> 
    1818<?php else: ?> 
    19       <td>[?php echo $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</td> 
     19      <td>[?php echo $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</td> 
    2020<?php endif; ?> 
    2121<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/branches/1.1/data/generator/sfDoctrineCrud/default/template/templates/showSuccess.php

    r11494 r12051  
    44    <tr> 
    55      <th><?php echo sfInflector::humanize(sfInflector::underscore($column->getPhpName())) ?>:</th> 
    6       <td>[?= $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</td> 
     6      <td>[?= $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</td> 
    77    </tr> 
    88<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/branches/1.1/lib/generator/sfDoctrineCrudGenerator.class.php

    r11703 r12051  
    212212    if ($developed) 
    213213    { 
    214       return sprintf("$%s%s->get('%s')", $prefix, $this->getSingularName(), $column->getName()); 
     214      return sprintf("$%s%s['%s']", $prefix, $this->getSingularName(), $column->getName()); 
    215215    } 
    216216 
  • plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineAdmin/crud/template/templates/listSuccess.php

    r5647 r12051  
    1414<?php foreach ($this->getColumns('') as $column): ?> 
    1515  <?php if ($column->isPrimaryKey()): ?> 
    16   <td>[?php echo link_to($<?php echo $this->getSingularName() ?>->get('<?php echo $column->getPhpName() ?>'), '<?php echo $this->getModuleName() ?>/show?<?php echo $this->getPrimaryKeyUrlParams() ?>); ?]</td> 
     16  <td>[?php echo link_to($<?php echo $this->getSingularName() ?>['<?php echo $column->getPhpName() ?>'], '<?php echo $this->getModuleName() ?>/show?<?php echo $this->getPrimaryKeyUrlParams() ?>); ?]</td> 
    1717  <?php else: ?> 
    18   <td>[?php echo $<?php echo $this->getSingularName() ?>->get('<?php echo $column->getPhpName() ?>'); ?]</td> 
     18  <td>[?php echo $<?php echo $this->getSingularName() ?>['<?php echo $column->getPhpName() ?>']; ?]</td> 
    1919  <?php endif; ?> 
    2020<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineAdmin/crud/template/templates/showSuccess.php

    r5647 r12051  
    44<tr> 
    55<th><?php echo sfInflector::humanize(sfInflector::underscore($column->getPhpName())) ?>: </th> 
    6 <td>[?= $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</td> 
     6<td>[?= $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</td> 
    77</tr> 
    88<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineCrud/default/template/templates/indexSuccess.php

    r11494 r12051  
    1515<?php foreach ($this->getAllColumns() as $column): ?> 
    1616<?php if ($column->isPrimaryKey()): ?> 
    17       <td><a href="[?php echo url_for('<?php echo $this->getModuleName() ?>/<?php echo isset($this->params['with_show']) && $this->params['with_show'] ? 'show' : 'edit' ?>?<?php echo $this->getPrimaryKeyUrlParams() ?>) ?]">[?php echo $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</a></td> 
     17      <td><a href="[?php echo url_for('<?php echo $this->getModuleName() ?>/<?php echo isset($this->params['with_show']) && $this->params['with_show'] ? 'show' : 'edit' ?>?<?php echo $this->getPrimaryKeyUrlParams() ?>) ?]">[?php echo $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</a></td> 
    1818<?php else: ?> 
    19       <td>[?php echo $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</td> 
     19      <td>[?php echo $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</td> 
    2020<?php endif; ?> 
    2121<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineCrud/default/template/templates/showSuccess.php

    r11494 r12051  
    44    <tr> 
    55      <th><?php echo sfInflector::humanize(sfInflector::underscore($column->getPhpName())) ?>:</th> 
    6       <td>[?= $<?php echo $this->getSingularName() ?>->get<?php echo $column->getPhpName() ?>() ?]</td> 
     6      <td>[?= $<?php echo $this->getSingularName() ?>['<?php echo $column->getName() ?>'] ?]</td> 
    77    </tr> 
    88<?php endforeach; ?> 
  • plugins/sfDoctrinePlugin/trunk/lib/generator/sfDoctrineCrudGenerator.class.php

    r11703 r12051  
    214214    if ($developed) 
    215215    { 
    216       return sprintf("$%s%s->get('%s')", $prefix, $this->getSingularName(), $column->getName()); 
     216      return sprintf("$%s%s['%s']", $prefix, $this->getSingularName(), $column->getName()); 
    217217    } 
    218218