コード例 #1
0
ファイル: 1304TestCase.php プロジェクト: swk/bluebox
 public function setUp()
 {
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'content')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'title'), 'indexName' => 'i18n_sluggable_test'));
     $i18n0->addChild($sluggable1);
     $this->actAs($i18n0);
 }
コード例 #2
0
ファイル: 1619TestCase.php プロジェクト: swk/bluebox
 public function setUp()
 {
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'name', 1 => 'description')));
     $searchable1 = new Doctrine_Template_Searchable(array('fields' => array(0 => 'name')));
     $i18n0->addChild($searchable1);
     $this->actAs($i18n0);
 }
コード例 #3
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Model_Hm_Geo_Region as Regions', array('local' => 'id', 'foreign' => 'hm_geo_country_id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'name')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'name')));
     $i18n0->addChild($sluggable1);
     $this->actAs($i18n0);
 }
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Comment as Comments', array('local' => 'id', 'foreign' => 'article_id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'content', 2 => 'slug')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'title'), 'uniqueBy' => array(0 => 'lang', 1 => 'title'), 'canUpdate' => false));
     $i18n0->addChild($sluggable1);
     $this->actAs($i18n0);
 }
コード例 #5
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Model_Hm_Home as Homes', array('refClass' => 'Model_Hm_Home_Category', 'local' => 'hm_category_id', 'foreign' => 'hm_home_id'));
     $this->hasMany('Model_Hm_Home as Hm_Home', array('refClass' => 'Model_Hm_Home_category', 'local' => 'hm_category_id', 'foreign' => 'hm_home_id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'name', 1 => 'description')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'name')));
     $i18n0->addChild($sluggable1);
     $this->actAs($i18n0);
 }
コード例 #6
0
ファイル: BaseArticle.class.php プロジェクト: habtom/uas
 public function setUp()
 {
     $this->hasOne('Author', array('local' => 'author_id', 'foreign' => 'id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'body')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'title'), 'uniqueBy' => array(0 => 'lang', 1 => 'title')));
     $i18n0->addChild($sluggable1);
     $timestampable0 = new Doctrine_Template_Timestampable();
     $this->actAs($i18n0);
     $this->actAs($timestampable0);
 }
コード例 #7
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Model_Entity_StoryApplication as StoryApplication', array('local' => 'id', 'foreign' => 'application_id'));
     $this->hasMany('Model_Entity_Story as Application', array('refClass' => 'Model_Entity_StoryApplication', 'local' => 'application_id', 'foreign' => 'story_id'));
     $this->hasMany('Model_Entity_Feedback as Feedback', array('local' => 'id', 'foreign' => 'application_id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'description'), 'className' => 'ApplicationTranslation', 'length' => 2));
     $searchable1 = new Doctrine_Template_Searchable(array('fields' => array(0 => 'title', 1 => 'description'), 'className' => 'SystemApplicationSearch'));
     $i18n0->addChild($searchable1);
     $this->actAs($i18n0);
 }
コード例 #8
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('BlogPost as Blogs', array('local' => 'id', 'foreign' => 'category_id'));
     $timestampable0 = new Doctrine_Template_Timestampable();
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'name')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'name'), 'uniqueBy' => array(0 => 'lang', 1 => 'name')));
     $i18n0->addChild($sluggable1);
     $this->actAs($timestampable0);
     $this->actAs($i18n0);
 }
コード例 #9
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Model_Hm_Home as Home', array('local' => 'hm_home_id', 'foreign' => 'id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'description')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'title')));
     $i18n0->addChild($sluggable1);
     $timestampable0 = new Doctrine_Template_Timestampable();
     $this->actAs($i18n0);
     $this->actAs($timestampable0);
 }
コード例 #10
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Author', array('local' => 'author_id', 'foreign' => 'id'));
     $this->hasMany('CamelCase as camelCase', array('local' => 'id', 'foreign' => 'article_id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'body', 2 => 'test_column')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'title'), 'uniqueBy' => array(0 => 'lang', 1 => 'title')));
     $i18n0->addChild($sluggable1);
     $timestampable0 = new Doctrine_Template_Timestampable();
     $this->actAs($i18n0);
     $this->actAs($timestampable0);
 }
コード例 #11
0
ファイル: BasePostCategory.php プロジェクト: hbasria/pjango
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Site', array('local' => 'site_id', 'foreign' => 'id'));
     $this->hasMany('Post', array('refClass' => 'PostCategories', 'local' => 'category_id', 'foreign' => 'post_id'));
     $nestedset0 = new Doctrine_Template_NestedSet(array('hasManyRoots' => true, 'rootColumnName' => 'root_id'));
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'name')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'name')));
     $i18n0->addChild($sluggable1);
     $this->actAs($nestedset0);
     $this->actAs($i18n0);
 }
コード例 #12
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('JobeetJob as JobeetJobs', array('local' => 'id', 'foreign' => 'category_id'));
     $this->hasMany('JobeetAffiliate as JobeetAffiliates', array('refClass' => 'JobeetCategoryAffiliate', 'local' => 'category_id', 'foreign' => 'affiliate_id'));
     $this->hasMany('JobeetCategoryAffiliate', array('local' => 'id', 'foreign' => 'category_id'));
     $timestampable0 = new Doctrine_Template_Timestampable();
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'name')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'name'), 'uniqueBy' => array(0 => 'lang', 1 => 'name')));
     $i18n0->addChild($sluggable1);
     $this->actAs($timestampable0);
     $this->actAs($i18n0);
 }
コード例 #13
0
ファイル: BaseDmTestDomain.class.php プロジェクト: jdart/diem
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('DmTestCateg as Categs', array('refClass' => 'DmTestDomainCateg', 'local' => 'domain_id', 'foreign' => 'categ_id'));
     $this->hasMany('DmTestDomainCateg', array('local' => 'id', 'foreign' => 'domain_id'));
     $timestampable0 = new Doctrine_Template_Timestampable();
     $sortable0 = new Doctrine_Template_Sortable();
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'is_active')));
     $dmblameable1 = new Doctrine_Template_DmBlameable();
     $i18n0->addChild($dmblameable1);
     $dmtaggable0 = new Doctrine_Template_DmTaggable();
     $this->actAs($timestampable0);
     $this->actAs($sortable0);
     $this->actAs($i18n0);
     $this->actAs($dmtaggable0);
 }
コード例 #14
0
ファイル: Role.php プロジェクト: esironal/kebab-project
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Model_Entity_User as Users', array('refClass' => 'Model_Entity_UserRole', 'local' => 'role_id', 'foreign' => 'user_id'));
     $this->hasMany('Model_Entity_Story as Stories', array('refClass' => 'Model_Entity_Permission', 'local' => 'role_id', 'foreign' => 'story_id'));
     $this->hasMany('Model_Entity_Permission as Permission', array('local' => 'id', 'foreign' => 'role_id'));
     $this->hasMany('Model_Entity_UserRole as UserRole', array('local' => 'id', 'foreign' => 'role_id'));
     $timestampable0 = new Doctrine_Template_Timestampable();
     $blameable0 = new Doctrine_Template_Blameable();
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'description'), 'className' => 'RoleTranslation', 'length' => 2));
     $searchable1 = new Doctrine_Template_Searchable(array('fields' => array(0 => 'title'), 'className' => 'SystemRoleSearch'));
     $i18n0->addChild($searchable1);
     $this->actAs($timestampable0);
     $this->actAs($blameable0);
     $this->actAs($i18n0);
 }
コード例 #15
0
ファイル: BasePost.php プロジェクト: hbasria/pjango
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Site', array('local' => 'site_id', 'foreign' => 'id'));
     $this->hasOne('User as CreatedBy', array('local' => 'created_by', 'foreign' => 'id'));
     $this->hasOne('User as UpdatedBy', array('local' => 'updated_by', 'foreign' => 'id'));
     $this->hasOne('Post as Parent', array('local' => 'parent_id', 'foreign' => 'id'));
     $this->hasMany('PostCategory as Categories', array('refClass' => 'PostCategories', 'local' => 'post_id', 'foreign' => 'category_id'));
     $this->hasMany('Post', array('local' => 'id', 'foreign' => 'parent_id'));
     $timestampable0 = new Doctrine_Template_Timestampable();
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'content', 2 => 'excerpt')));
     $sluggable1 = new Doctrine_Template_Sluggable(array('fields' => array(0 => 'title')));
     $i18n0->addChild($sluggable1);
     $this->actAs($timestampable0);
     $this->actAs($i18n0);
 }
コード例 #16
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('DmTestCateg as Categ', array('local' => 'categ_id', 'foreign' => 'id', 'onDelete' => 'CASCADE'));
     $this->hasOne('DmUser as Author', array('local' => 'user_id', 'foreign' => 'id', 'onDelete' => 'CASCADE'));
     $this->hasOne('DmMedia as Image', array('local' => 'image_id', 'foreign' => 'id'));
     $this->hasOne('DmMedia as File', array('local' => 'file_id', 'foreign' => 'id'));
     $this->hasMany('DmTestTag as Tags', array('refClass' => 'DmTestPostTag', 'local' => 'post_id', 'foreign' => 'tag_id'));
     $this->hasOne('DmUser as CreatedBy', array('local' => 'created_by', 'foreign' => 'id', 'onDelete' => 'SET NULL'));
     $this->hasMany('DmTestPostTag', array('local' => 'id', 'foreign' => 'post_id'));
     $this->hasMany('DmTestComment as Comments', array('local' => 'id', 'foreign' => 'post_id'));
     $timestampable0 = new Doctrine_Template_Timestampable();
     $sortable0 = new Doctrine_Template_Sortable();
     $dmgallery0 = new Doctrine_Template_DmGallery();
     $i18n0 = new Doctrine_Template_I18n(array('fields' => array(0 => 'title', 1 => 'excerpt', 2 => 'body', 3 => 'url', 4 => 'is_active')));
     $dmversionable1 = new Doctrine_Template_DmVersionable(array('fields' => NULL));
     $i18n0->addChild($dmversionable1);
     $this->actAs($timestampable0);
     $this->actAs($sortable0);
     $this->actAs($dmgallery0);
     $this->actAs($i18n0);
 }
コード例 #17
0
 public function setUp()
 {
     $i18n = new Doctrine_Template_I18n(array('fields' => array('title')));
     $i18n->addChild(new CustomTemplate());
     $this->actAs($i18n);
 }
コード例 #18
0
 public function setUp()
 {
     $options = array('fields' => array('title', 'content'));
     $auditLog = new Doctrine_Template_Versionable($options);
     $search = new Doctrine_Template_Searchable($options);
     $slug = new Doctrine_Template_Sluggable(array('fields' => array('title')));
     $i18n = new Doctrine_Template_I18n($options);
     $i18n->addChild($auditLog)->addChild($search)->addChild($slug);
     $this->actAs($i18n);
     $this->actAs('Timestampable');
 }