isicsPropelNestedSetPositionPlugin - 0.9.5

A simple way to handle Propel nested set objects position.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Dependencies Releases Changelog Contribute
Show source | Show as Markdown

isicsPropelNestedSetPosition plugin

This plugins adds a widget and a valitor for easily handle your Propel nested set objects position.


  • Requirements:

    • sfPropelPlugin (Propel 1.3): native nested set support
  • Install the plugin

      symfony plugin-install
  • Clear the cache

      symfony cache:clear


In your sfFormPropel class:

  • use the widget isicsWigetFormPropelNestedSetPosition:

        'position' => new isicsWigetFormPropelNestedSetPosition(array('node' => $this->object))
  • use the validator isicsValidatorPropelNestedSetPosition:

        'position' => new isicsValidatorPropelNestedSetPosition(array('node' => $this->object, 'max_depth' => 3))

    max_depth option is optionnal.

  • customize the doSave() method:

      public function doSave($con = null)
        if (!is_null($position = $this->getValue('position')))
  • I18N: by default, methods translations have to be in "messages" catalogue. You can specify any catalogue in app.yml:

        i18n_catalogue: my_catalogue
  • By default, a new node is added as last child of root. You're also able to define another default method and related node:

        'position' => new isicsWigetFormPropelNestedSetPosition(array(
          'node'                 => $this->object,
          'default_method'       => 'insertAsFirstChildOf',
          'default_related_node' => my_parent_node->getId()


  • Write unit tests