To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 1071

Show
Ignore:
Timestamp:
04/27/10 14:25:35 (22 months ago)
Author:
johnnyoffline
Message:

Blog migration and build all classes

Location:
sandboxes/asandbox/trunk/lib
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • sandboxes/asandbox/trunk/lib/filter/doctrine/apostropheBlogPlugin/base/BaseaBlogItemFormFilter.class.php

    r932 r1071  
    1717      'page_id'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Page'), 'add_empty' => true)), 
    1818      'title'           => new sfWidgetFormFilterInput(array('with_empty' => false)), 
     19      'slug_saved'      => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))), 
    1920      'excerpt'         => new sfWidgetFormFilterInput(), 
    2021      'status'          => new sfWidgetFormChoice(array('choices' => array('' => '', 'draft' => 'draft', 'pending review' => 'pending review', 'published' => 'published'))), 
     
    3637      'page_id'         => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Page'), 'column' => 'id')), 
    3738      'title'           => new sfValidatorPass(array('required' => false)), 
     39      'slug_saved'      => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))), 
    3840      'excerpt'         => new sfValidatorPass(array('required' => false)), 
    3941      'status'          => new sfValidatorChoice(array('required' => false, 'choices' => array('draft' => 'draft', 'pending review' => 'pending review', 'published' => 'published'))), 
     
    104106      'page_id'         => 'ForeignKey', 
    105107      'title'           => 'Text', 
     108      'slug_saved'      => 'Boolean', 
    106109      'excerpt'         => 'Text', 
    107110      'status'          => 'Enum', 
  • sandboxes/asandbox/trunk/lib/form/doctrine/apostropheBlogPlugin/base/BaseaBlogItemForm.class.php

    r932 r1071  
    2020      'page_id'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Page'), 'add_empty' => true)), 
    2121      'title'           => new sfWidgetFormInputText(), 
     22      'slug_saved'      => new sfWidgetFormInputCheckbox(), 
    2223      'excerpt'         => new sfWidgetFormTextarea(), 
    2324      'status'          => new sfWidgetFormChoice(array('choices' => array('draft' => 'draft', 'pending review' => 'pending review', 'published' => 'published'))), 
     
    4041      'page_id'         => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Page'), 'required' => false)), 
    4142      'title'           => new sfValidatorString(array('max_length' => 255)), 
     43      'slug_saved'      => new sfValidatorBoolean(array('required' => false)), 
    4244      'excerpt'         => new sfValidatorString(array('required' => false)), 
    4345      'status'          => new sfValidatorChoice(array('choices' => array(0 => 'draft', 1 => 'pending review', 2 => 'published'), 'required' => false)), 
  • sandboxes/asandbox/trunk/lib/model/doctrine/apostropheBlogPlugin/base/BaseaBlogItem.class.php

    r932 r1071  
    1010 * @property integer $page_id 
    1111 * @property string $title 
     12 * @property boolean $slug_saved 
    1213 * @property string $excerpt 
    1314 * @property enum $status 
     
    2930 * @method integer             getPageId()             Returns the current record's "page_id" value 
    3031 * @method string              getTitle()              Returns the current record's "title" value 
     32 * @method boolean             getSlugSaved()          Returns the current record's "slug_saved" value 
    3133 * @method string              getExcerpt()            Returns the current record's "excerpt" value 
    3234 * @method enum                getStatus()             Returns the current record's "status" value 
     
    4749 * @method aBlogItem           setPageId()             Sets the current record's "page_id" value 
    4850 * @method aBlogItem           setTitle()              Sets the current record's "title" value 
     51 * @method aBlogItem           setSlugSaved()          Sets the current record's "slug_saved" value 
    4952 * @method aBlogItem           setExcerpt()            Sets the current record's "excerpt" value 
    5053 * @method aBlogItem           setStatus()             Sets the current record's "status" value 
     
    9194             'length' => 255, 
    9295             )); 
     96        $this->hasColumn('slug_saved', 'boolean', null, array( 
     97             'type' => 'boolean', 
     98             'default' => false, 
     99             )); 
    93100        $this->hasColumn('excerpt', 'string', null, array( 
    94101             'type' => 'string', 
     
    177184        $taggable0 = new Taggable(); 
    178185        $sluggable0 = new Doctrine_Template_Sluggable(array( 
    179              'canUpdate' => true, 
     186             'fields' =>  
     187             array( 
     188              0 => 'title', 
     189             ), 
     190             'builder' =>  
     191             array( 
     192              0 => 'aTools', 
     193              1 => 'slugify', 
     194             ), 
    180195             )); 
    181196        $this->actAs($timestampable0);