Commits

matteosister committed 6087212

deleted lib and schema, now the behavior only add two columns to the model

Comments (0)

Files changed (8)

config/schema.yml

-# Yml compilato da Matteo
-package: plugins.sfPropel15RatableBehaviorPlugin.lib.model
-
-
-classes:
-  sfRatable:
-    columns:
-      id:            ~
-      ratable_model: { type: varchar(50), required: true }
-      ratable_id:    { type: integer, required: true }
-      user_id:       { type: integer, required: false, default: ~ }
-      rating:        { type: integer }
-    propel_behaviors:
-      timestampable:   ~

lib/filter/base/BasesfRatableFormFilter.class.php

-<?php
-
-/**
- * sfRatable filter form base class.
- *
- * @package    ##PROJECT_NAME##
- * @subpackage filter
- * @author     ##AUTHOR_NAME##
- */
-abstract class BasesfRatableFormFilter extends BaseFormFilterPropel
-{
-  public function setup()
-  {
-    $this->setWidgets(array(
-      'ratable_model' => new sfWidgetFormFilterInput(array('with_empty' => false)),
-      'ratable_id'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
-      'user_id'       => new sfWidgetFormFilterInput(),
-      'rating'        => new sfWidgetFormFilterInput(),
-      'created_at'    => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
-      'updated_at'    => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
-    ));
-
-    $this->setValidators(array(
-      'ratable_model' => new sfValidatorPass(array('required' => false)),
-      'ratable_id'    => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
-      'user_id'       => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
-      'rating'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
-      'created_at'    => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
-      'updated_at'    => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
-    ));
-
-    $this->widgetSchema->setNameFormat('sf_ratable_filters[%s]');
-
-    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
-
-    parent::setup();
-  }
-
-  public function getModelName()
-  {
-    return 'sfRatable';
-  }
-
-  public function getFields()
-  {
-    return array(
-      'id'            => 'Number',
-      'ratable_model' => 'Text',
-      'ratable_id'    => 'Number',
-      'user_id'       => 'Number',
-      'rating'        => 'Number',
-      'created_at'    => 'Date',
-      'updated_at'    => 'Date',
-    );
-  }
-}

lib/filter/sfRatableFormFilter.class.php

-<?php
-
-/**
- * sfRatable filter form.
- *
- * @package    ##PROJECT_NAME##
- * @subpackage filter
- * @author     ##AUTHOR_NAME##
- */
-class sfRatableFormFilter extends BasesfRatableFormFilter
-{
-  public function configure()
-  {
-  }
-}

lib/form/base/BasesfRatableForm.class.php

-<?php
-
-/**
- * sfRatable form base class.
- *
- * @method sfRatable getObject() Returns the current form's model object
- *
- * @package    ##PROJECT_NAME##
- * @subpackage form
- * @author     ##AUTHOR_NAME##
- */
-abstract class BasesfRatableForm extends BaseFormPropel
-{
-  public function setup()
-  {
-    $this->setWidgets(array(
-      'id'            => new sfWidgetFormInputHidden(),
-      'ratable_model' => new sfWidgetFormInputText(),
-      'ratable_id'    => new sfWidgetFormInputText(),
-      'user_id'       => new sfWidgetFormInputText(),
-      'rating'        => new sfWidgetFormInputText(),
-      'created_at'    => new sfWidgetFormDateTime(),
-      'updated_at'    => new sfWidgetFormDateTime(),
-    ));
-
-    $this->setValidators(array(
-      'id'            => new sfValidatorPropelChoice(array('model' => 'sfRatable', 'column' => 'id', 'required' => false)),
-      'ratable_model' => new sfValidatorString(array('max_length' => 50)),
-      'ratable_id'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
-      'user_id'       => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
-      'rating'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
-      'created_at'    => new sfValidatorDateTime(array('required' => false)),
-      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
-    ));
-
-    $this->widgetSchema->setNameFormat('sf_ratable[%s]');
-
-    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
-
-    parent::setup();
-  }
-
-  public function getModelName()
-  {
-    return 'sfRatable';
-  }
-
-
-}

lib/form/sfRatableForm.class.php

-<?php
-
-/**
- * sfRatable form.
- *
- * @package    ##PROJECT_NAME##
- * @subpackage form
- * @author     ##AUTHOR_NAME##
- */
-class sfRatableForm extends BasesfRatableForm
-{
-  public function configure()
-  {
-  }
-}

lib/model/sfRatable.php

-<?php
-
-
-
-/**
- * Skeleton subclass for representing a row from the 'sf_ratable' table.
- *
- * 
- *
- * This class was autogenerated by Propel 1.6.0-dev on:
- *
- * Mon Feb  7 23:32:46 2011
- *
- * You should add additional methods to this class to meet the
- * application requirements.  This class will only be generated as
- * long as it does not already exist in the output directory.
- *
- * @package    propel.generator.plugins.sfPropel15RatableBehaviorPlugin.lib.model
- */
-class sfRatable extends BasesfRatable {
-
-} // sfRatable

lib/model/sfRatablePeer.php

-<?php
-
-
-
-/**
- * Skeleton subclass for performing query and update operations on the 'sf_ratable' table.
- *
- * 
- *
- * This class was autogenerated by Propel 1.6.0-dev on:
- *
- * Mon Feb  7 23:32:46 2011
- *
- * You should add additional methods to this class to meet the
- * application requirements.  This class will only be generated as
- * long as it does not already exist in the output directory.
- *
- * @package    propel.generator.plugins.sfPropel15RatableBehaviorPlugin.lib.model
- */
-class sfRatablePeer extends BasesfRatablePeer {
-
-} // sfRatablePeer

lib/model/sfRatableQuery.php

-<?php
-
-
-
-/**
- * Skeleton subclass for performing query and update operations on the 'sf_ratable' table.
- *
- * 
- *
- * This class was autogenerated by Propel 1.6.0-dev on:
- *
- * Mon Feb  7 23:32:46 2011
- *
- * You should add additional methods to this class to meet the
- * application requirements.  This class will only be generated as
- * long as it does not already exist in the output directory.
- *
- * @package    propel.generator.plugins.sfPropel15RatableBehaviorPlugin.lib.model
- */
-class sfRatableQuery extends BasesfRatableQuery {
-
-} // sfRatableQuery
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.