Development

Changeset 12066

You must first sign up to be able to contribute.

Changeset 12066

Show
Ignore:
Timestamp:
10/08/08 11:35:33 (5 years ago)
Author:
nicolas.charlot
Message:

Renamed node field to related_node (avoid confusion with node option)
Updated README

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/isicsPropelNestedSetPositionPlugin/README

    r12065 r12066  
    5050        if (!is_null($position = $this->getValue('position'))) 
    5151        { 
    52           $this->object->$position['method']($position['node']); 
     52          $this->object->$position['method']($position['related_node']); 
    5353        } 
    5454     
  • plugins/isicsPropelNestedSetPositionPlugin/lib/validator/isicsValidatorPropelNestedSetPosition.class.php

    r12065 r12066  
    9595 
    9696    $criteria = new Criteria(); 
    97     $criteria->add($this->getPrimaryKey(), $value['node']); 
     97    $criteria->add($this->getPrimaryKey(), $value['related_node']); 
    9898    $related_node = call_user_func(array($node->getPeer(), 'doSelectOne'), $criteria, $this->getOption('connection')); 
    9999 
     
    141141    } 
    142142     
    143     $value['node'] = $related_node; 
     143    $value['related_node'] = $related_node; 
    144144     
    145145    return $value; 
  • plugins/isicsPropelNestedSetPositionPlugin/lib/widget/isicsWidgetFormPropelNestedSetPosition.class.php

    r12065 r12066  
    129129        if ($node->isNew()) 
    130130        { 
    131           $value = array('method' => 'insertAsLastChildOf', 'node' => null); 
     131          $value = array('method' => 'insertAsLastChildOf', 'related_node' => null); 
    132132        }       
    133133        else 
     
    138138            if ($node->hasNextSibling()) 
    139139            { 
    140               $value['method'] = 'moveToNextSiblingOf'; 
    141               $value['node']  = $node->retrievePrevSibling()->getId(); 
     140              $value['method']       = 'moveToNextSiblingOf'; 
     141              $value['related_node'] = $node->retrievePrevSibling()->getId(); 
    142142            } 
    143143            else 
    144144            { 
    145               $value['method'] = 'moveToLastChildOf'; 
    146               $value['node']  = $node->retrieveParent()->getId(); 
     145              $value['method']       = 'moveToLastChildOf'; 
     146              $value['related_node'] = $node->retrieveParent()->getId(); 
    147147            } 
    148148          } 
    149149          else 
    150150          { 
    151             $value['method'] = 'moveToFirstChildOf'; 
    152             $value['node']  = $node->retrieveParent()->getId(); 
     151            $value['method']       = 'moveToFirstChildOf'; 
     152            $value['related_node'] = $node->retrieveParent()->getId(); 
    153153          }         
    154154        }  
     
    161161      // Node widget 
    162162      $node_widget = new sfWidgetFormSelect(array('choices' => $node_choices)); 
    163       $to_return  .= $node_widget->render($name.'[node]', $value['node'], $attributes);      
     163      $to_return  .= $node_widget->render($name.'[related_node]', $value['related_node'], $attributes);      
    164164    } 
    165165