ogDynamicParametersPlugin - 0.3.1

dynamic forms generator

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Dependencies Releases Changelog Contribute
Show source

about ogDynamicParameters

ogDynamicParameters let you manage parameters of any items. You can define item parameters by item family and item model. ogDynamicParameters will offer you the form to create and edit item with all parameters defined.

What's ogDynamicParameters IS

  • A symfony plugin/application
  • A dynamic forms builder
  • A layer to develop an evolutive backend application

What's ogDynamicParameters IS NOT

  • It's not a CMS to publish a frontend site (like very good Apostrophe and others)
  • It's not a phpMyAdmin
  • It's not a out of the box application

General working

Item form are created from item model. It automaticaly include item model parameters and item family parameters.

Parameters settings inheritance

Parameter settings can be override for a family or a model (name, type, default values, ...)

Wich types of field are available and how do the are rendered?

Are model and family both required?

Yes! An item must have a model and a model must have a family

How to add new item family

How to add new item model

How to implement with my model

prerequis: You need to install csDoctrineActAsSortablePlugin

enable plugin modules in project/apps/my_app/config/settings.yml:

all:
  .settings:
    enabled_modules: [og_dp_item_family, og_dp_item_model, og_dp_parameter, og_dp_global, og_dp_extra]  

default forms configuration in project/lib/form/doctrine/BaseFormDoctrine.class.php:

public function configure() 
{
  unset($this['created_at'], $this['updated_at']);
  $this->widgetSchema->setFormFormatterName('list');

  if(isset($this->widgetSchema['image'])) {
    $this->widgetSchema['image'] = new sfWidgetFormInputFileEditable(array(
      'file_src'  => '/uploads/medias/'.$this->getObject()->getImage(),
      'is_image'  => true,
      'edit_mode' => (!$this->isNew() && $this->getObject()->getImage() != ''),
      'template'  => '%file%%input%<br />%delete% remove',
    ));
    $this->validatorSchema['image'] = new sfValidatorFile(array(
      'required' => false,
      'path' => sfConfig::get('sf_upload_dir').'/medias',
      'mime_types' => 'web_images'
    ));
    $this->validatorSchema['image_delete'] = new sfValidatorBoolean();
  }
}

You can browse http://myproject/myapp/og_dp_item_family

If you don't want your object to Item class objects, you have to make your own model inherit from item.

MyModel:
  inheritance:
    extends: Item
    type: concrete

Database model

Licence, support, usage

MIT Licence. Feel free to use/modify/sell it in respect of the MIT Licence.
It comes with no waranty and no support.

Road map

  • add new parameter types
  • add readers/editors settings on models/parameters with sfGuardPlugin
  • add methods to Item and Parameter class to help integration in frontend applications
  • add frontend CRUD module templates